bug: install.sh ignores XDG_CONFIG_HOME for the local gateway config
Maintainer antworten meist innerhalb von 1 Tag
@fede-kamel arbeitet bereits daran.
Seit 01.10.2026.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 88/100
Rechercherichtung
Beginne in install.sh mit der Untersuchung der Bereitschaftsprüfung und der Bereinigungspfade, die derzeit das lokale Gateway-Konfigurationsverzeichnis verwenden. Führe mise run test:install-sh aus und decke dabei nicht gesetzte, leere, gesetzte und gesetzte XDG_CONFIG_HOME-Werte mit Leerzeichen ab. Erledigt ist die Aufgabe, wenn Installer und CLI dasselbe Verzeichnis verwenden, die aufgeführten Neuinstallationsszenarien mit Exit-Code 0 beendet werden und die Akzeptanzprüfungen bestehen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 15.4k
- Forks
- 1.7k
- Ø Merge
- 2 T. 22 Min.
- Gemergte PRs (30 T.)
- 352
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/OpenShell
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
docs: document workspace and provider label capabilitiesEvtl. vergeben @johntmyers hat das vor 6 Tagen übernommen. Offenarea:docs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
NVIDIA/OpenShell#4250 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug(driver-mxc): test helper fails to compile after gateway-name argumentEvtl. vergeben @feloy hat das vor 7 Tagen übernommen. Offenstate:triage-needed
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in NVIDIA/OpenShell
Ähnliche Issues
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arraysOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
neondatabase/neon#12965 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
goauthentik/authentik#26867 ·
Maintainer antworten meist innerhalb von 1 Tag
-
api bug macos maintainer-needed p2 triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
eclipse-zenoh/zenoh#2842 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag