Beautify PHP on Atom.io returns Bad Argument error

110 Views Asked by At

I've hit a stumbling block whilst using Atom.io, unfortunately whenever I try and configure atom-beautify to work with PHP, it returns this stacktrace:

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:278:26)
    at exports.spawn (child_process.js:384:9)
    at /Users/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:136:17
    at Promise._execute (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/debuggability.js:299:9)
    at Promise._resolveFromExecutor (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:481:18)
    at new Promise (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:77:14)
    at PHPCSFixer.module.exports.Beautifier.getShellEnvironment (/Users/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:116:16)
    at /Users/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:269:38
    at tryCatcher (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:636:18)
    at PromiseArray._resolve (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:125:19)
    at PromiseArray._promiseFulfilled (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:143:14)
    at Promise._settlePromise (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:636:18)
    at PromiseArray._resolve (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:125:19)
    at PromiseArray._promiseFulfilled (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:143:14)
    at Promise._settlePromise (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:148:10)
    at Async.drainQueues (/Users/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:17:14)

It appears to be on this line, where it's attempting to get the shell:

at PHPCSFixer.module.exports.Beautifier.getShellEnvironment (/Users/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:116:16)

I'm using iTerm2, but I'm unsure why this would make a difference! Has anyone come across this error before? If so, how did you resolve it?

0

There are 0 best solutions below