`enable-package-alias: true` installs the alias but never activates it (`JFROG_CLI_GHOST_FROG` is never set)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- github-actions, go, typescript
Direzione di ricerca
Traccia la gestione dell'input enable-package-alias e l'aggiornamento esistente di GITHUB_PATH nell'action, quindi esamina come gli step successivi ricevono le variabili d'ambiente. Riproduci il workflow fornito senza credenziali JFrog, decidi come dovrebbe essere regolata l'attivazione e verifica che i comandi package-alias come go mod download vengano intercettati, gestendo correttamente la versione minima della CLI.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
With enable-package-alias: true, the action runs jf package-alias install and appends the alias directory to GITHUB_PATH, but it never sets the JFROG_CLI_GHOST_FROG environment variable. JFrog CLI's package-alias ("Ghost Frog") interception is opt-in and off by default — DispatchIfAlias returns early unless JFROG_CLI_GHOST_FROG is set. So the documented behavior ("mvn, npm, go, etc. are transparently intercepted in subsequent steps") never happens: the go shim is on PATH, but with the gate off, go mod download runs the jf binary as a normal CLI (jf mod download) and fails.
This is independent of JFrog platform/auth configuration — it fails before any network call, purely because the interception gate is off.
Current behavior
In a step after the action:
jf package-alias statusreportsState: ENABLED,PATH: Configured [OK], andPackage aliasing is active. You can now run: ... go build— i.e. it looks active.echo "$JFROG_CLI_GHOST_FROG"→ empty (the action never exported it).go mod download→'jf mod' is not a jf command. See --help ##[error]Process completed with exit code 1.
Reproduction steps
Minimal workflow — no JFrog instance or secrets required:
- uses: actions/setup-go@v6
with: { go-version: "1.23" }
- uses: jfrog/setup-jfrog-cli@v5.1.0
with:
version: 2.111.0
enable-package-alias: true
- run: jf package-alias status # reports "active"
- run: go mod download # 'jf mod' is not a jf command -> exit 1
Runnable, green-CI proofs (matrix over jf 2.100.0 / 2.111.0 / latest): https://github.com/wberry-godaddy/jfrog-cli-examples — see the 05-setup-action-gap workflow.
Expected behavior
With enable-package-alias: true, subsequent go/npm/… commands should actually be intercepted, as documented. The action should export JFROG_CLI_GHOST_FROG to GITHUB_ENV — the env-var counterpart to the GITHUB_PATH it already appends.
Suggested fix / consideration: exporting JFROG_CLI_GHOST_FROG=true activates interception for every go/npm/mvn call in later steps, which can break steps running commands that aren't backed by a configured resolver. Consider gating it behind an explicit input (e.g. package-alias-mode: true|audit|off) rather than enabling it unconditionally.
Secondary: the minimum-version gate for this feature is 2.93.0 (MIN_CLI_VERSION_PACKAGE_ALIAS), but jf package-alias first ships in JFrog CLI 2.100.0 (jfrog/jfrog-cli#3375). With version pinned to 2.93.0–2.99.x, jf package-alias install fails and the action only logs a warning, so the floor likely should be 2.100.0.
Versions
- Setup JFrog CLI version: v5.1.0
- JFrog CLI version: reproduced on 2.100.0, 2.111.0, and
latest - Workflow operating system type and version: ubuntu-latest (GitHub-hosted)
- JFrog Artifactory version: n/a (not needed to reproduce)
- JFrog Xray version: n/a
- Lingua principale
- TypeScript
- Stelle
- 266
- Fork
- 110
- Merge medio
- 3g 15h
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jfrog/setup-jfrog-cli
-
Ghost mode continues to intercept commands after POST configuration step within GitHub Actions Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
jfrog/setup-jfrog-cli#349 ·
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
jfrog/setup-jfrog-cli#348 ·
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
jfrog/setup-jfrog-cli#347 · 1 commento ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
jfrog/setup-jfrog-cli#339 ·
-
(short feature description) Apertafeature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
jfrog/setup-jfrog-cli#325 ·
Tutte le issue di jfrog/setup-jfrog-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bcgov/bc-wallet-mobile#4761 · 1 commento ·
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100