Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread Mike Bonner
fail. > > > I am for example nearly always working as root (that's the > > > only way to avoid silly errors) but never would allow others > > > to use my root shell. > > > > > > > Is there any way to get lc to process .bash_profile by default? > >

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread David Bovill
sh_profile by default? > > > > Why not set $PATH or $PATH-additions in the preferences? > > > > > > > > -- > > View this message in context: > > > http://runtime-revolution.278305.n4.nabble.com/Running-Node-or-any-unix-cmd-line-program-from-Shell-from-

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread Mike Bonner
$PATH or $PATH-additions in the preferences? > > > > -- > 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-tp4704464p4704490.html > Sent from the Revolution - User mailing list archive

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread [-hh]
use my root shell. > Is there any way to get lc to process .bash_profile by default? Why not set $PATH or $PATH-additions in the preferences? -- 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-tp470

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread Mike Bonner
Try this: set the shellcommand to "/bin/bash" get shell("source ~/.bash_profile ; ") 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 g

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread David Bovill
like to propose *moreover* to ensure that /usr/local/bin > is added to $PATH ( I have here the paths: > /usr/local/bin/brew and /usr/local/bin/npm ) > > > > > -- > View this message in context: > http://runtime-revolution.278305.n4.nabble.com/Running-Node-or-any-unix-cmd-l

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread [-hh]
n/brew and /usr/local/bin/npm ) -- 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-tp4704464p4704487.html Sent from the Revolution - User mailing list archive at Nabble.com. __

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread David Bovill
Yes - here is the handler you need: command bash_AddSystemPathsToPATH > if the platform = "MacOS" then -- and it is recent ??? > put url "file:/etc/paths" into systemPaths > put token 1 to -1 of systemPaths into systemPathArray > put $PATH into revPATH > replace ":" with CR in revPATH > put system

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread Mark Waddingham
Yes - I think a 'login' type shell option would help here. (Which, if I recall correctly, causes the standard terminal setup scripts to run). The reason the action of shell is to not use a login shell is because otherwise env vars you might want to pass to your new process might get clobbered by

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-09 Thread Mark Waddingham
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

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread [-hh]
lute 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 > > ahsof

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Sannyasin Brahmanathaswami
@ Warren: Bingo: # in terminal: $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin # from LC put shell ("echo $PATH") /usr/bin:/bin:/usr/sbin:/sbin # checking which $ which node /usr/local/bin/node @HH I think I will stick with Mark's recommendation to specify the abs

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Mark Wieder
On 05/08/2016 03:06 PM, [-hh] wrote: On Mac, especially 10.11.x (with SIP enabled) , most user installations MUST go into "/usr/local/bin". So adjust the LC global $PATH to shell's $PATH. Minimal: on preopenstack put "/usr/local/bin:" before $PATH -- put ":/usr/local/bin" after $PATH end p

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread [-hh]
eopenstack The second line prefers "system installations" before "user installations". [Is it worth an enhancement request to add "/usr/local/bin" by default to LC's global $PATH on Mac?] -- View this message in context: http://runtime-revolution.278305.n4.nab

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Warren Samples
On 05/08/2016 04:07 PM, Sannyasin Brahmanathaswami wrote: It's something about LC now knowing that I have node installed when invoked via shell BR Compare what you get when you run 'echo $PATH' in a terminal to what you get when you run it in LiveCode using shell(). Make sure the directory

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Sannyasin Brahmanathaswami
Aloha: cd /Users/Brahmanathaswami/Documents/media-books/_hap-epub-export-tool ls runs just fine...so /bin/sh is delivering from LC "no problemo" It's something about LC now knowing that I have node installed when invoked via shell BR On 5/8/16, 10:51 AM, "use-livecode on behalf of Jerry J

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Jerry Jensen
Never mind, the msg box does run /bin/sh Sorry for the bandwidth waste > On May 8, 2016, at 1:46 PM, Jerry Jensen wrote: > > Which shell runs from the command line? Maybe not /bin/sh > >> On May 8, 2016, at 1:20 PM, Sannyasin Brahmanathaswami >> wrote: >> >> >> I have a stack with a field t

Re: Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Jerry Jensen
Which shell runs from the command line? Maybe not /bin/sh > On May 8, 2016, at 1:20 PM, Sannyasin Brahmanathaswami > wrote: > > > I have a stack with a field that contains a shell script: > > cd /Users/Brahmanathaswami/Documents/media-books/_hap-epub-export-tool > node index.js --epubFile ###

Running Node (or any unix cmd line program) from Shell from a LC Stack

2016-05-08 Thread Sannyasin Brahmanathaswami
I have a stack with a field that contains a shell script: cd /Users/Brahmanathaswami/Documents/media-books/_hap-epub-export-tool node index.js --epubFile ###epubPath### -e -i ###OutputDirectory### I replace the strings with real values. Second line looks like this: node index.js --epubFile /U