Skip to content

fix(install): make install.sh POSIX-sh compatible#31

Merged
ralyodio merged 1 commit into
masterfrom
fix/install-sh-posix
Jun 17, 2026
Merged

fix(install): make install.sh POSIX-sh compatible#31
ralyodio merged 1 commit into
masterfrom
fix/install-sh-posix

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

curl -fsSL https://c0upons.com/install.sh | sh failed with:

sh: 5: set: Illegal option -o pipefail

The script declared #!/usr/bin/env bash but the documented (and natural) invocation pipes it to sh (dash on Debian/Ubuntu), which ignores the shebang. It used several bashisms: set -o pipefail, echo -e, [[ ... ]], &>.

Rewritten as POSIX sh: set -eu, printf '%b', case for PATH matching, >/dev/null 2>&1. Behavior preserved. Verified with dash -n/sh -n and a stubbed dry-run under dash.

🤖 Generated with Claude Code

The documented usage is `curl -fsSL https://c0upons.com/install.sh | sh`,
but the script used bashisms (`set -o pipefail`, `echo -e`, `[[ ]]`,
`&>`) so under dash/sh it failed immediately with
`set: Illegal option -o pipefail`.

Rewrite using only POSIX constructs: `set -eu`, `printf '%b'` instead of
`echo -e`, `case` instead of `[[ ... == *..* ]]`, and
`>/dev/null 2>&1`. Verified under `dash` and `sh`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ralyodio ralyodio merged commit 572d9b5 into master Jun 17, 2026
5 checks passed
@ralyodio ralyodio deleted the fix/install-sh-posix branch June 17, 2026 02:54
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

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