Merge branch '2.2' into 2.3

This commit is contained in:
Markus Mäkelä
2019-03-11 10:49:06 +02:00
2 changed files with 13 additions and 10 deletions

View File

@ -50,9 +50,14 @@ module.exports = function() {
// No password given, ask it from the command line
if (argv.p == '') {
argv.p = readlineSync.question('Enter password: ', {
hideEchoBack: true
})
if (process.stdin.isTTY) {
argv.p = readlineSync.question('Enter password: ', {
hideEchoBack: true
})
} else {
var line = fs.readFileSync(0)
argv.p = line.toString().trim()
}
}
// Split the hostnames, separated by commas