Skip to content

fix: use export for env vars in install script examples#319

Merged
BYK merged 1 commit into
mainfrom
fix/install-env-var-propagation
May 14, 2026
Merged

fix: use export for env vars in install script examples#319
BYK merged 1 commit into
mainfrom
fix/install-env-var-propagation

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 14, 2026

Summary

  • Fix env var propagation bug in install script usage examples: LORE_VERSION=nightly curl ... | bash sets the variable in curl's environment, not in the bash process that runs the piped script — so LORE_VERSION always resolves to empty
  • Changed to export LORE_VERSION=nightly && curl ... | bash which correctly propagates the variable through the pipe
  • Same fix applied to LORE_INSTALL_DIR example (same bug)

LORE_VERSION=nightly curl ... | bash sets the variable in curl's
environment, not in the bash process that runs the script. The pipe
creates a separate process that never inherits it, so the variable
resolves to empty and the script falls through to latest release.

Fix by using export so the variable is visible to all child processes.
@BYK BYK merged commit 9d6fbc7 into main May 14, 2026
1 check passed
@BYK BYK deleted the fix/install-env-var-propagation branch May 14, 2026 19:24
@craft-deployer craft-deployer Bot mentioned this pull request May 14, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant