Shell command return 255
jmyepes at mac.com
Sun Jun 20 19:36:15 CDT 2010
Reply myself... and explain a little so I think can be usefully for
The solution is that we must specify from where we want exec the command.
MacOSX Shell execute by default from the shell "/bin/sh", that isn't the
shell from the Terminal, so testing commandlines from the terminal that
produces correct results, from the shell can produce error.
How to know from where the command is executed. In terminal put "which
<command>", and we get the entire path to the command.
To test from the shell "/bin/sh" into the Terminal. Put "/bin/sh" and press
enter. Now we are in the same shell that is called from shell and from Rev.
Test your command here, if here is ok, copy the commandline and exec from
Rev. Put "exit" to return to your normal shell into the Terminal.
In my case the correct commandline for exec from "/bin/sh".
put ("/usr/local/bin/dot -Tjpg -o /users/jos/desktop/graph.jpg
/users/jos/desktop/test01.dot") into tCommand
Shell in Rev return the exit code into "the Result" and the error message
into the "it". Checking both you can view the error code and error message.
But if you specify a incorrect path the shell, then return empty and no
action success, while testing the same commandline into the Terminal shell,
can produce a correct result, confusing yourself. :)
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Shell-command-return-255-tp2262032p2262051.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode