chore: set env variables

This commit is contained in:
calebboyd
2019-04-15 23:22:49 -05:00
parent 0afbe3b732
commit a6ad034336
11 changed files with 257 additions and 373 deletions
+6 -1
View File
@@ -6,8 +6,8 @@ import { dequote, STDIN_FLAG } from '../util'
import { Readable } from 'stream'
function getStdIn(stdin: Readable): Promise<string> {
let out = ''
return new Promise(resolve => {
let out = ''
stdin
.setEncoding('utf8')
.on('readable', () => {
@@ -17,6 +17,11 @@ function getStdIn(stdin: Readable): Promise<string> {
}
})
.on('end', () => resolve(out.trim()))
setTimeout(() => {
if (!out.trim()) {
resolve(out.trim())
}
}, 1000)
})
}