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

Fix OS detection w/ 'uname' on non-Linux systems #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ernstki
Copy link
Contributor

@ernstki ernstki commented Nov 9, 2021

Commit ed8a3b6 broke OS detection on non-Linux OSes, because $CYGWIN_NT expands to nothing when the environment variable CYGWIN_NT is undefined.

What @DookTibs meant was just "$sack__OS == "CYGWIN_NT"* (no dollar sign). It still worked under Cygwin, but just by luck, because $sack__OS == *. Adding set -u / set -o nounset at the top of the script would stop these kinds of errors from slipping through, but that's a problem for another day.

This PR should fix that problem, and makes OS detection work again on (at least) macOS.

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