0

This works in Terminal

sudo npm install ios-sim -g

so why does this not work in AppleScript:

do shell script "cd /usr/local/lib/node_modules/npm;" & "install ios-sim - g" with administrator privileges
1
  • Remove the semi-colon after "npm" and try. Commented Mar 4, 2014 at 22:13

2 Answers 2

2

You're not calling the same command and you're using different arguments:

npm install ios-sim -g
^^^                 ^^

versus

install ios-sim - g
^^^^^^^         ^ ^
Sign up to request clarification or add additional context in comments.

Comments

-1

Could be a formatting issue, add a space after the semi-colon and remove the space on the -g arg.

eg,

do shell script "cd /usr/local/lib/node_modules/npm; " & "install ios-sim -g" with administrator privileges

Failing this, let us know what the result and/or error is in Applescript Editor.

2 Comments

I'm Getting this error error "install: ios-sim: No such file or directory" number 71@adamh
does, do shell script "npm install ios-sim -g" work? Looks like you are browsing to a directory with a similar name to the command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.