mkenney/docker-npm

Running yarn --help attempts invokes self-update

bretmette opened this issue · 5 comments

Here is what happens when I run yarn --help

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

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

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

I made a pull request that should fix this error.

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?

@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)

@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!