tableflip / guvnor

A node process manager that isn't spanners all the way down
MIT License
430 stars 37 forks source link

Command failed: which groupadd on OS X #35

Closed paambaati closed 9 years ago

paambaati commented 9 years ago

I just installed process-boss v2.6.3 on OS X running Node.js v0.12.0 via Homebrew. Installation went fine, save for a few deprecation warnings (which I suppose were because of Node 0.12), but when I tried to start boss, here's the error I got.

sudo bs -v                                                                                                          
debug: Loaded config from 0=/usr/local/lib/node_modules/process-boss/bossrc
warn: Boss has been configured to start with the group 'boss' but that group does not exist
prompt: create group 'boss' [Y/n]:  (Y) y
debug: Creating group boss
error: Uncaught exception Command failed: which groupadd

error: Error: Command failed: which groupadd

    at checkExecSyncError (child_process.js:1339:13)
    at Object.execSync (child_process.js:1379:13)
    at null.<anonymous> (/usr/local/lib/node_modules/process-boss/lib/cli/CLI.js:319:28)
    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:316:32

    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/utile/node_modules/async/lib/async.js:142:25
    at assembler (/usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:313:9)
    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:322:32

    at /usr/local/lib/node_modules/process-boss/node_modules/prompt/lib/prompt.js:597:5
    at Interface.onLine (/usr/local/lib/node_modules/process-boss/node_modules/prompt/node_modules/read/lib/read.js:111:5)
    at Interface.emit (events.js:107:17)

I took a quick look at the code, and I see that you're try-catching groupadd (which is a Linux command), and moving on to dscl, which should be used for OS X. I am not entirely sure why the try-catch didn't work, though. Is there some more data I could provide to debug this issue?

achingbrain commented 9 years ago

I just spotted this too - it'll be fixed in the next release (most likely tomorrow), really sorry.

In the interim you can create the group manually using System Preferences.

paambaati commented 9 years ago

Awesomesauce.

paambaati commented 9 years ago

Works now!