sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

Error running script: Object #<Socket> has no method 'clearLine' #77

Closed arw180 closed 10 years ago

arw180 commented 10 years ago

I'm using grunt-shell to run the resume export script that is part of the jsonresume project (specifically the resume-cli and I get the following error:

/usr/local/lib/node_modules/resume-cli/node_modules/cli-spinner/index.js:16
    process.stdout.clearLine();
                   ^
TypeError: Object #<Socket> has no method 'clearLine'
    at null.<anonymous> (/usr/local/lib/node_modules/resume-cli/node_modules/cli-spinner/index.js:16:20)
    at wrapper [as _onTimeout] (timers.js:252:14)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

It works fine when run straight from the command line though.

arw180 commented 10 years ago

Upon further inspection this is almost certainly an issue with the resume-cli script itself and not grunt-shell

sindresorhus commented 10 years ago

@arw180 for resume-cli authors: they should only use the cli-spinner when process.stdout.isTTY is true.