FWeinb / node-osascript

Use AppleScript from node
68 stars 9 forks source link

Err: Path must be a string. Received undefined - node 0.6.x #8

Closed przemyslawpluta closed 7 years ago

przemyslawpluta commented 8 years ago

Running osascript.execute(cmd, cb) produces this error

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at dirname (path.js:1324:5)
    at execute (/Users/dev/build/out/node_modules/node-osascript/lib/index.js:24:52)
    at Object.module.exports.execute (/Users/dev/build/out/node_modules/node-osascript/lib/index.js:64:5)
    at ask (/Users/dev/build/out/utils/osa.js:30:17)
    at Object.getDisplaysDetails (/Users/dev/build/out/utils/osa.js:39:7)
    at scanForDisplays (/Users/dev/build/out/sight.js:444:7)
    at PromptUI.prompt [as completed] (/Users/dev/build/out/sight.js:489:7)
    at PromptUI.onCompletion (/Users/dev/build/out/node_modules/inquirer/lib/ui/prompt.js:69:10)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/Users/dev/build/out/node_modules/rx/dist/rx.js:1793:12)
FWeinb commented 7 years ago

This should be fixed by #7