shashkovdanil / clean-publish

Removing configuration files and fields in package.json before publishing to npm

Home Page:https://www.npmjs.com/package/clean-publish

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot pass input file if isTTY is false

timocov opened this issue · comments

I'm not sure about that and don't really understand what isTTY property stands for, but it looks like it might be false even if no data provided in stdin - I've tested in github actions, and it fails with error

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Socket.<anonymous> (/home/runner/work/dts-bundle-generator/dts-bundle-generator/node_modules/clean-publish/utils.js:43:29)
    at Socket.emit (events.js:328:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)`

isTTY
? readJson(argv.input)
: readJsonFromStdin()

Related to actions/runner#241

Fixed in #84