install.sh fails under sh (dash) on Debian: set -euo pipefail is bash-only #12

Closed
opened 2026-08-17 17:30:32 +00:00 by jsutter · 0 comments
Owner

Found by the dit-e2e T0 install-smoke scenario (2026-08-17).

Bug: install.sh begins #!/usr/bin/env bash + set -euo pipefail, but the shebang is ignored when piped via | sh -s --. Debian 12's /bin/sh is dash, which dies immediately:

sh: 2: set: Illegal option -o pipefail

Exit 2, no binary installed.

Reproduction (Debian 12 VM):

curl -fsSL https://forge.deepnet.com/deepnet/dit-releases/raw/branch/main/install.sh | sh -s -- dito
# → sh: 2: set: Illegal option -o pipefail (exit 2)

The | bash -s -- form works (and is what install.sh's own usage header documents). But the operator READMEs and many users will copy-paste the | sh -s -- form, which is the conventional one-liner pattern.

Fix options:

  1. Replace set -euo pipefail with POSIX set -eu (drop pipefail — dash doesn't support it).
  2. Or: make the script POSIX-compatible throughout (dash supports set -eu).
  3. Or: update all READMEs/docs to use | bash -s -- instead of | sh -s --.

Option 1 is the smallest change and keeps pipefail for bash users while not breaking dash. pipefail can be conditionally enabled: set -eu; set -o pipefail 2>/dev/null || true.

Context: the dit-e2e harness T0 scenario pins the | bash -s -- form as a workaround. This issue tracks fixing install.sh so the conventional | sh -s -- form works on Debian/Ubuntu (dash).

Filed by dn-tech from dit-e2e T0 live verification.

Found by the dit-e2e T0 install-smoke scenario (2026-08-17). **Bug:** `install.sh` begins `#!/usr/bin/env bash` + `set -euo pipefail`, but the shebang is ignored when piped via `| sh -s --`. Debian 12's `/bin/sh` is dash, which dies immediately: ``` sh: 2: set: Illegal option -o pipefail ``` Exit 2, no binary installed. **Reproduction (Debian 12 VM):** ``` curl -fsSL https://forge.deepnet.com/deepnet/dit-releases/raw/branch/main/install.sh | sh -s -- dito # → sh: 2: set: Illegal option -o pipefail (exit 2) ``` The `| bash -s --` form works (and is what install.sh's own usage header documents). But the operator READMEs and many users will copy-paste the `| sh -s --` form, which is the conventional one-liner pattern. **Fix options:** 1. Replace `set -euo pipefail` with POSIX `set -eu` (drop pipefail — dash doesn't support it). 2. Or: make the script POSIX-compatible throughout (dash supports `set -eu`). 3. Or: update all READMEs/docs to use `| bash -s --` instead of `| sh -s --`. Option 1 is the smallest change and keeps pipefail for bash users while not breaking dash. pipefail can be conditionally enabled: `set -eu; set -o pipefail 2>/dev/null || true`. **Context:** the dit-e2e harness T0 scenario pins the `| bash -s --` form as a workaround. This issue tracks fixing install.sh so the conventional `| sh -s --` form works on Debian/Ubuntu (dash). Filed by dn-tech from dit-e2e T0 live verification.
Sign in to join this conversation.
No labels
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
deepnet/dit-releases#12
No description provided.