bug: install.sh ignores XDG_CONFIG_HOME for the local gateway config
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu trong install.sh bằng cách kiểm tra phần kiểm tra trạng thái sẵn sàng và các đường dẫn dọn dẹp hiện đang sử dụng thư mục cấu hình gateway cục bộ. Chạy mise run test:install-sh, bao quát các giá trị XDG_CONFIG_HOME chưa được đặt, rỗng, đã được đặt và đã được đặt với khoảng trắng. Hoàn thành khi installer và CLI sử dụng cùng một thư mục, các kịch bản cài đặt lại được liệt kê thoát với mã thoát 0 và các kiểm tra chấp nhận đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
User Story
As someone whose shell exports XDG_CONFIG_HOME,
I want install.sh to use the same config directory as the openshell CLI,
so that installing and reinstalling OpenShell just work.
Problem Statement
The CLI keeps each gateway's entry and client certificates under $XDG_CONFIG_HOME/openshell when that variable is set. The installer always uses ~/.config/openshell instead, in two places:
- The readiness check, which connects to the gateway with the client certificates it expects to find there.
- The cleanup that removes an old
openshellentry before adding it again.
With the variable set, the installer and the CLI look in different directories.
Impact / Why This Matters
With XDG_CONFIG_HOME pointing somewhere other than ~/.config:
- On macOS, the install fails whenever
~/.config/openshellhas no client certificates for the gateway, or has old ones. The installer waits 30s and exits 1. - On macOS and Linux, running the installer a second time exits 1 with "Gateway 'openshell' already exists". When the gateway is already registered, the installer removes the entry and adds it again. But it removes it from
~/.config/openshell, and the CLI's entry is under$XDG_CONFIG_HOME/openshell. That entry is still there, so adding it again fails.
The gateway itself keeps running in both cases. On Linux the first run works only because the gateway service also writes a copy of its client certificates to ~/.config/openshell when it starts, so the readiness check happens to find current ones there.
The workarounds don't really work. Unsetting XDG_CONFIG_HOME just for the install puts the gateway entry under ~/.config, so the CLI in your normal shell can't find it afterwards. Running openshell gateway remove openshell before a reinstall avoids the "already exists" error, but not the certificate check on macOS. And nothing in the installer's output mentions the variable.
Acceptance Criteria
With XDG_CONFIG_HOME set and XDG_STATE_HOME unset:
- The installer exits 0 when
~/.config/openshellhas no client certificates for the gateway, and when it has old ones. - After the install,
openshell statusin the same shell shows the gateway. - Running the installer a second time exits 0.
In general:
- With
XDG_CONFIG_HOMEunset or empty, the installer keeps using~/.config/openshell. -
mise run test:install-shcovers unset, empty, set, and set-with-spaces values.
With both XDG_CONFIG_HOME and XDG_STATE_HOME set, the Linux install fails for a different reason, that maybe is not as important, and not described in this issue.
Reproduction Steps
export XDG_CONFIG_HOME="$(mktemp -d)", and make sure~/.config/openshell/gateways/openshelldoesn't exist.- Run
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh. - On macOS it waits 30s, prints
mTLS client bundle is not ready under ~/.config/..., and exits 1. On Linux it succeeds. - Run it again. Both platforms stop with
Gateway 'openshell' already exists.
Environment
- OpenShell 0.1.2, installer from
mainat9cb72baa2. The installer code involved is the same on currentmain. - macOS 26.2 arm64, Homebrew 7.0.7, run as the logged-in user
- Ubuntu 26.04 x86_64, deb package, run as root, Docker 29.1.3
Logs
# macOS, no certificates under ~/.config
mTLS client bundle is not ready under ~/.config/openshell/gateways/openshell/mtls
openshell: error: local gateway listener did not become reachable at https://localhost:17670/ within 30s
# macOS, old certificates under ~/.config
curl: (60) SSL certificate problem: unable to get local issuer certificate
# macOS and Linux, second run
openshell: local gateway already exists; removing and re-adding it...
Error: × Gateway 'openshell' already exists.
- Ngôn ngữ chính
- Rust
- Star
- 13.2k
- Fork
- 1.6k
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 346
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/OpenShell
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/OpenShell#3995 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
state:triage-needed
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/OpenShell#3400 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/OpenShell
Issue tương tự
-
discover: `sudo RTK_DISABLED=$VAR …` is not detected as a bypass when `sudo` is a transparent prefixĐang mởarea:cli bug good first issue priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
rtk-ai/rtk#4412 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[review-skill] Unresolved review threads need paginated GraphQL; first:100 silently truncatesĐang mởskill:code-review
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
component:sight
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
agentic-os-org/ANOLISA#4115 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rivet-dev/rivet#5819 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A-io-database bug needs triage python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày