Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix install script fails on some machines with "curl: (3) bad range specification in URL position" #22

Open
camerondurham opened this issue Jan 12, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@camerondurham
Copy link
Contributor

Error when running ./unix/seutp.sh:

Looking for docker...
Looking for ch...
Installing ch...
/usr/bin/unzip
curl: (3) bad range specification in URL position 156:
https://github.com/camerondurham/ch/releases/download/ check logic to `ch upgrade` command\r\n\r\n## Commits\r\n- cecd0fb: Implement #24 (Cameron Durham) [#25](https://github.com/camerondurham/ch/pull/25)\r\n- d277f7c: Update changelog with PR info resolving #24 (Cameron Durham) [#25](https://github.com/camerondurham/ch/pull/25)/ch-darwin-amd64.zip

grep had been aliased on student machine: grep: aliased to grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}

Should instead use /usr/bin/grep and /usr/bin/sed to protect against this in install shell scripts.

@camerondurham camerondurham self-assigned this Jan 12, 2022
@camerondurham camerondurham added the bug Something isn't working label Jan 12, 2022
@camerondurham camerondurham changed the title Protect install scripts against aliased commands Unix install script fails on some machines with "curl: (3) bad range specification in URL position" Jan 13, 2022
@camerondurham
Copy link
Contributor Author

Second thought it's probably not an aliased grep, the error is coming from curl from bad input and the grep is just to exclude files.

Several issues could cause the sed command to incorrectly parse the API response, unclear with limited information.

https://www.google.com/search?q=(3)+bad+range+specification+in+URL+position

Will keep open if someone else has this but do not want to update install scripts since hardcoding grep and sed could be equally annoying and faulty.

@camerondurham
Copy link
Contributor Author

camerondurham commented Aug 14, 2022

Homebrew users (particularly on macos) can now install with:

brew tap camerondurham/tap
brew install camerondurham/tap/ch

Verified the existing install script in my darwin-arm64 environment (M1 MacBook Air) and darwin-amd64 (Intel MacBook Pro).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant