-
Notifications
You must be signed in to change notification settings - Fork 104
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
sh: 74: [: UG}: unexpected operator #28
Comments
Maybe retry with
? |
With the latter script on bash:
|
Got exactly the same errors in both cases on Ubuntu 16.04 |
Ubuntu 16.10 doesn't like the spaces.
@maikokuppe - can you please try running the script as below (I've done a Pull Request with a possible fix)
|
Just tried the PR with possible fix, get the following error:
|
I got exactly the results as the others with the listed scripts. I'm using Xubuntu 16.04. |
Getting the same error right now. |
case/esac is a PITA - use longwinded if/elif/else ladder. Another possible fix for #28 - portability of statements. As we're testing for empty strings, can use "$var" If users specifies an install dir, assume that's equal to .npm-packages. We were assuming it was parent, but that's wrong.
Okay, I've tried fixing this problem again on the branch, please try the following:
or download the file from the branch and run manually - https://raw.githubusercontent.com/glenpike/npm-g_nosudo/b28-case-esac/npm-g-nosudo.sh If you have problems, please tell me what shell you are running with the following:
|
@glenpike
Here's shell info u have requested:
And linux info:
|
Hi, @a2nt Okay - it looks like piping the wget output to bash causes issues with the elif statement.
Then
Then
(I've just tried this in a brand new vagrant machine on Ubuntu 16.04 using the shell and it seems to behave correctly) |
If that's not behaving, do you have bash installed on Debian - I'm guessing I could change the shebang so it has to run under bash, but that might exclude people - I've tried making it compliant as possible, but maybe doing something wrong there. |
I just tried this on a Pi and seems to be working as far as I can tell so thank you so much for the continued work and support on this. Note: This is running using wget. |
Thanks @gauntface - is that using master branch or the PR one? |
When running this with wget command on Raspbian I get the following errors:
The text was updated successfully, but these errors were encountered: