getting-started.sh with no arguments dies on an empty argument from its own re-exec #12

Closed
opened 2026-10-09 16:26:54 +01:00 by vnprc-agent · 1 comment

bash getting-started.sh with no arguments dies immediately with getting-started: unknown argument: (an empty argument) on a fresh NixOS install, after nix-shell has fetched git, age and jq.

Evidence, from a laptop running the script as the README says, 2026-10-09:

copying path '/nix/store/...-git-2.54.0' from 'https://cache.nixos.org'...
getting-started: unknown argument:

Cause, read from the script: the re-exec line exec nix-shell -p git age jq --run "bash $(printf '%q' "$0") $(printf '%q ' "$@")" runs printf '%q ' once with no operands when $@ is empty, which prints '', so the re-executed script receives one empty argument. The argument loop added in allod/deploy#11 rejects any argument it does not know, where the earlier [[ "${1:-}" == "--prepare-only" ]] tolerated it. --prepare-only and --forge are unaffected, which is why every test of that change passed.

Workaround until the fix lands: nix-shell -p git age jq --run 'ALLOD_GETTING_STARTED_SHELL=1 bash getting-started.sh'.

`bash getting-started.sh` with no arguments dies immediately with `getting-started: unknown argument: ` (an empty argument) on a fresh NixOS install, after nix-shell has fetched git, age and jq. Evidence, from a laptop running the script as the README says, 2026-10-09: copying path '/nix/store/...-git-2.54.0' from 'https://cache.nixos.org'... getting-started: unknown argument: Cause, read from the script: the re-exec line `exec nix-shell -p git age jq --run "bash $(printf '%q' "$0") $(printf '%q ' "$@")"` runs `printf '%q '` once with no operands when `$@` is empty, which prints `''`, so the re-executed script receives one empty argument. The argument loop added in allod/deploy#11 rejects any argument it does not know, where the earlier `[[ "${1:-}" == "--prepare-only" ]]` tolerated it. `--prepare-only` and `--forge` are unaffected, which is why every test of that change passed. Workaround until the fix lands: `nix-shell -p git age jq --run 'ALLOD_GETTING_STARTED_SHELL=1 bash getting-started.sh'`.
Author

Landed on allod/deploy master: the re-exec builds its argument list only from real arguments (the getting-started.sh fix, on master since 832c183). Witnessed on the public install walk's second and third clean installs, 2026-10-09: bash getting-started.sh with no arguments runs through.

Landed on allod/deploy master: the re-exec builds its argument list only from real arguments (the getting-started.sh fix, on master since 832c183). Witnessed on the public install walk's second and third clean installs, 2026-10-09: bash getting-started.sh with no arguments runs through.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
allod/deploy#12
No description provided.