Running Node (or any unix cmd line program) from Shell from a LC Stack
hh at hh.on-rev.com
Sun May 8 21:23:56 EDT 2016
It's sadly a big "not". I've never seen anything else than
in LC's $PATH at startup.
But the $PATH of *any* shell on 10.11.x (SIP enabled)
contains /usr/local/bin [because SIP doesn't allow to
install in /usr/bin].
Everybody could use Warren's comparison from above
on his Mac for that.
Is it possible, that LC's $PATH is simply set and not
been asked from the OS?
The following works for me.
function getPath p
set itemdel to colon
if "/usr/local/bin" is not among the items of $PATH
then put "/usr/local/bin:" before $PATH
set itemdel to comma
return shell("which" && p)
>> Is it worth an enhancement request to add "/usr/local/bin" by default
>> to LC's global $PATH on Mac?
> Possibly. Maybe an addendum to
> http://quality.livecode.com/show_bug.cgi?id=10569, although that's four
> years old now (wow - even Mark Waddingham's enhancement requests don't
> get any love).
> I think the documentation on the shell() command needs some work to
> cover things like this (hint for anyone who wants to take this task on).
> The shell you get when you invoke the shell() command is a bit the same
> as the shell you get in the terminal prompt and a bit not. You're
> running into one of the nots.
> Another way around this is to specify the absolute path to node instead
> of letting the OS get it from the PATH env variable. You could also
> change the PATh setting in one of the config rc files... I'm not at my
> Mac right now, so I can't tell you which one.
> Mark Wieder
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Running-Node-or-any-unix-cmd-line-program-from-Shell-from-a-LC-Stack-tp4704464p4704472.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the Use-livecode