Only start repl if standard input is a terminal

This commit is contained in:
Cadence Ember 2020-04-05 01:20:12 +13:00
parent 1b7269fae7
commit f4969f86db
No known key found for this signature in database
GPG Key ID: 128B99B1B74A6412
1 changed files with 4 additions and 1 deletions

View File

@ -41,5 +41,8 @@ subdirs("pug", async (err, dirs) => {
Object.assign(passthrough, pinski.getExports())
console.log("Server started")
require("./repl")
if (process.stdin.isTTY || process.argv.includes("--enable-repl")) {
require("./repl")
}
})