max-mapper/monu

load PATH of mac user

max-mapper opened this issue · 1 comments

when you run atom-shell index.js you can do e.g. require('child_process').exec('foo') and if foo is in your PATH it will find it.

but when you run it by double clicking Monu.app it says 'command not found: foo'. gotta figure this out :(

bevry/safeps comes to the rescue here, you can use safeps.getExecPath('foo', (err,path){}) then use safeps.exec, or just use safeps.spawn which will do the execPath thing automatically.

Usage examples: https://github.com/bevry/safeps/blob/master/src/test/safeps-test.coffee