bug: install.sh ignores XDG_CONFIG_HOME for the local gateway config
Les mainteneurs répondent en général sous 1 jour
@fede-kamel y travaille déjà.
Depuis le 1/10/2026.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 88/100
Piste de recherche
Commencez dans install.sh en inspectant la vérification de disponibilité et les chemins de nettoyage qui utilisent actuellement le répertoire de configuration de la passerelle locale. Exécutez mise run test:install-sh en couvrant les valeurs de XDG_CONFIG_HOME non définie, vide, définie et définie avec des espaces. Le travail est terminé lorsque l’installateur et la CLI utilisent le même répertoire, que les scénarios de réinstallation indiqués se terminent avec le code de sortie 0 et que les vérifications d’acceptation réussissent.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 16.3k
- Forks
- 1.8k
- Merge moyen
- 2 j 6 h
- PR mergées (30 j)
- 397
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA/OpenShell
-
bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhostPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouvertestate:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
NVIDIA/OpenShell#4518 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloadedOuvertestate:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
NVIDIA/OpenShell#4515 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
NVIDIA/OpenShell#4509 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de NVIDIA/OpenShell
Issues similaires
-
priority: low
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
storytold/photocraft#6286 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Four problem loader browser tests fail on WindowsPeut-être pris @Patriciaath999 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
original-bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
effort/S kind/docs
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Claude Code guards in .claude/settings.json never block: they read unset variables and exit 1Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
starkware-libs/sequencer#15229 ·
Les mainteneurs répondent en général sous 1 jour