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

Sannyasin Brahmanathaswami brahma at hindu.org
Sun May 8 21:49:16 EDT 2016


@ 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 absolute path.. this works

cd /Users/Brahmanathaswami/Documents/media-books/_hap-epub-export-tool
/usr/local/bin/node index.js --epubFile ###epubPath### -e -i ###OutputDirectory###


Awesome, now with a some keys on the remote server and a little scp I am cooking with gas..

Mahalo!

BR

p.s. HH Wrote:  Is it worth an enhancement request to add "/usr/local/bin" by default
to LC's global $PATH on Mac? 

BR: yes indeed... not sure bug ID 10569 is the place for it I though as the scope of Mark's (Waddington) idea there seems a bit different to me.. though I am not an expert...




On 5/8/16, 12:22 PM, "use-livecode on behalf of Warren Samples" <use-livecode-bounces at lists.runrev.com on behalf of warren at warrensweb.us> wrote:

>Compare what you get when you run 'echo $PATH' in a terminal to what you 
>get when you run it in LiveCode using shell()


More information about the use-livecode mailing list