I know I am probably missing this hugely,
but anyone knows why this keeps returning an error?
$ node -v && node
v0.4.6
> var cmd = 'osascript -e "open location \"http://google.com\""';
> require('child_process').exec(cmd, function (error, stdout, stderr) { console.log(error); });
//Error message
> {
stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'Command failed: 15:20: syntax error: A “:” can’t go after this identifier. (-2740)\n',
killed: false,
code: 1,
signal: null
}
Perhaps it has something to do with the double quotes in the cmd
?