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

Support capital 'Darwin' $OSTYPE #96

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

Conversation

sh78
Copy link

@sh78 sh78 commented Aug 19, 2018

On some macOS environments, the $OSTYPE environment variable is
'Darwin' (capitalized) and not 'darwin'. This caused the install script
to echo "OS Darwin is not supported!" and exit, even if everything was
in fact in order.

This patch uses a case-insensitive regex against a standard bash
operator
to allow any $OSTYPE that starts with 'Darwin' or
'darwin'.

All other instances of conditional checks for darwin* are also patched
across the code base.

On some macOS environments, the `$OSTYPE` environment variable is
'Darwin' (capitalized) and not 'darwin'. This caused the install script
to echo "OS Darwin is not supported!" and exit, even if everything was
in fact in order.

This patch uses a case-insensitive regex against a [standard bash
operator](1) to allow any `$OSTYPE` that starts with 'Darwin' or
'darwin'.

All other instances of conditional checks for darwin* are also patched
across the code base.

[1]: https://www.gnu.org/software/bash/manual/bash.html#index-_005d_005d
@sh78
Copy link
Author

sh78 commented Aug 19, 2018

Also - so happy I found this. Multiple times per day at work I press escape in out ticketing system's textarea and loose my entire comment. Really cool that you pulled this off.

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.

None yet

1 participant