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

Prefer gawk over awk if both are available. #581

Merged
merged 1 commit into from
Apr 19, 2014

Conversation

LawnGnome
Copy link
Contributor

This fixes rbenv help on Solaris 11.1.

@mislav
Copy link
Member

mislav commented Apr 18, 2014

I would like to hear more explanation. How is awk on Solaris broken?

@LawnGnome
Copy link
Contributor Author

Output:

vagrant@solaris-vagrant:~/.rbenv$ rbenv help
Usage: rbenv <command> [<args>]

Some useful rbenv commands are:
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24
awk: syntax error near line 13
awk: bailing out near line 13
awk: newline in string near line 24

See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/sstephenson/rbenv#readme

The first error appears to be that Solaris awk doesn't support the /^( *$| )/ && reading_usage pattern syntax (it presumably wants a real regex rather than a global variable to check). I'm somewhat hazier on the second error — it's been some years since I did anything much with awk!

mislav added a commit that referenced this pull request Apr 19, 2014
Prefer gawk over awk if both are available.

Fixes rbenv-help on Solaris 11.1
@mislav mislav merged commit fe0b243 into rbenv:master Apr 19, 2014
@mislav
Copy link
Member

mislav commented Apr 19, 2014

Gah! Why doesn't Solaris just have GNU utils as first-class citizens? Anyway, merged. Thanks!

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

2 participants