google / zx

A tool for writing better scripts

Home Page:https://npmjs.com/package/zx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: the input device is not a TTY (TTY not needed)

gunta opened this issue · comments

Related: #191

Expected Behavior

Using Google's Wireit which doesn't have nor needs a TTY

package.json

 "scripts": {
    "example": "wireit"
 },
"wireit": {
    "example": {
         "command": "zx script.js"
    }

script.js

await $`sh somescript.sh`

Actual Behavior

the input device is not a TTY
    at setupBackend (/Users/a12907/Documents/GitHub/dooer/scripts.js:86:10)
    exit code: 1
    at ChildProcess.<anonymous> (node_modules/.pnpm/zx@6.1.0/node_modules/zx/src/index.mjs:105:20)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1090:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:527:28)
    at Pipe.<anonymous> (node:net:715:12)

Looks like tty symulation is out of zx scope.

ezoic increase your site revenue