Running Node (or any unix cmd line program) from Shell from a LC Stack
bonnmike at gmail.com
Tue May 10 00:09:29 CEST 2016
set the shellcommand to "/bin/bash"
get shell("source ~/.bash_profile ; <yourcommands here> ")
This should do all the environment setting that is done when you open a
terminal so that hopefully paths will match.
To check it out, first echo $PATH without sourcing the .bash_profile and
you'll most likely get a teensy little path.
Then do it with get shell("source ~/.bash_profile; echo $PATH") and it
should match (hopefully) the path in the terminal. (don't forget to set the
shellcommand, though /bin/sh and bash are similar, so maybe it will work
Is there any way to get lc to process .bash_profile by default? If not,
what shell startup script is run (if any?) by lc when using the default
More information about the use-livecode