Repository navigation
fix: use env bash in host scripts for NixOS support - #10030
Conversation
The setup, install, restore, migration, swarm, and AIO build scripts hardcode /bin/bash, which doesn't exist on NixOS and other non-FHS systems, so they fail with "No such file or directory" before running. Use `#!/usr/bin/env bash`, and call `bash -c` in install.sh, so bash resolves from PATH. Container entrypoints keep /bin/bash, since they run inside Plane's images. Closes #4597 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
- getEnvValue reads everything after the first "=", and updateEnvFile writes values literally (awk from the environment instead of sed), so syncEnvFile keeps existing values containing "=", "&", "|", "/" or "\" on upgrade. generateInstallSecrets uses updateEnvFile, and setEnvValueLiteral is removed. - The merge with preview keeps the "#!/usr/bin/env bash" shebangs and "bash -c" from #10030, generateStorageCredentials from #10074, and preview's AIO README text (AIO requires both keys and exits when missing). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- getEnvValue reads everything after the first "=", and updateEnvFile writes values literally (awk from the environment instead of sed), so syncEnvFile keeps existing values containing "=", "&", "|", "/" or "\" on upgrade. generateInstallSecrets uses updateEnvFile, and setEnvValueLiteral is removed. - The merge with preview keeps the "#!/usr/bin/env bash" shebangs and "bash -c" from #10030, generateStorageCredentials from #10074, and preview's AIO README text (AIO requires both keys and exits when missing).
Backport of upstream makeplane/plane 4e0e403 (makeplane#10030). setup.sh, the Compose and Swarm installers, restore, the 0.13-0.14 migration and the all-in-one build script hard-coded /bin/bash, which does not exist on NixOS and other non-FHS systems. They now use `#!/usr/bin/env bash`, and install.sh runs `bash -c`. Applied with sed over the fork's scripts rather than cherry-picked, since install.sh has diverged; the fork-only migrate-object-storage.sh already used env. Container entrypoints keep /bin/bash.
Description
The scripts that run on the host hardcode
/bin/bash. NixOS and other non-FHS systems don't have/bin/bash, so these scripts fail withNo such file or directorybefore they run.This PR changes the shebang to
#!/usr/bin/env bashin the following host scripts:setup.shdeployments/cli/community/install.shdeployments/cli/community/restore.shdeployments/cli/community/restore-airgapped.shdeployments/cli/community/migration-0.13-0.14.shdeployments/swarm/community/swarm.shdeployments/aio/community/build.shinstall.shalso runs/bin/bash -c "$COMPOSE_CMD ..."for every Docker Compose call, so those becomebash -c. Without that, the installer still fails at its first Compose call.Container entrypoints (
apps/api/bin/docker-entrypoint-*.shand the AIOstart.sh) keep/bin/bash, since they run inside Plane's images.Type of Change
Screenshots and Media (if applicable)
N/A
Test Scenarios
I ran the scripts in a
bwrapsandbox laid out like stock NixOS: only/bin/shand/usr/bin/env, with bash onPATHand a stubdockerthat prints its arguments../install.sh stoppreviewbwrap: execvp ./install.sh: No such file or directory/bin/bash -ckept./install.sh: line 422: /bin/bash: No such file or directory[stub docker] compose -f .../plane-app/docker-compose.yaml --env-file=.../plane-app/plane.env down./setup.shfails the same way onpreviewand runs with this PR. All changed scripts passbash -n, and ShellCheck reports no errors.References
Closes #4597
🤖 Generated with Claude Code
Summary by CodeRabbit