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

Running yarn --help attempts invokes self-update #24

Closed
bretmette opened this issue Oct 28, 2016 · 5 comments
Closed

Running yarn --help attempts invokes self-update #24

bretmette opened this issue Oct 28, 2016 · 5 comments

Comments

@bretmette
Copy link
Contributor

Here is what happens when I run yarn --help

~/bin$ yarn --help
/home/web/bin/yarn: 7: [: self-update: unexpected operator
@bretmette
Copy link
Contributor Author

Actually this is happening for other commands, must be something on my end.

~/bin$ composer
/home/web/bin/composer: 7: [: self-update: unexpected operator

@bretmette
Copy link
Contributor Author

I made a pull request that should fix this error.

@mkenney
Copy link
Owner

mkenney commented Oct 28, 2016

Hey @bretmette

The double-equals was there intentionally at one point but I think one of the scripts was using double-brackets or something. This looks good to me, thanks!

BWT, what shell are you using?

@bretmette
Copy link
Contributor Author

@mkenney I'm not sure why it was choking on the comparison, but the == was the issue. When I changed it to = it worked. I wonder if using -eq would be more appropriate?

I am running bash 4.3.11

GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)

@mkenney
Copy link
Owner

mkenney commented Oct 31, 2016

@bretmette I think -eq is just for numeric comparisons. It's odd though that the single-equals didn't work, bash should be fully compatible with sh but the scripts are using whatever is set in your env with #!/usr/bin/env sh. I may go through and switch it out for #!/usr/bin/env bash though if I run into the issue again.

Thanks!

@mkenney mkenney closed this as completed Oct 31, 2016
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

No branches or pull requests

2 participants