Skip to content

Commit

Permalink
Fix interactive flag so that it forces REPL even when stdin is not a tty
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Apr 26, 2020
1 parent 47a560b commit 6a32006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ export function main (argv: string[]) {
Module.runMain()
} else {
// Piping of execution _only_ occurs when no other script is specified.
if (process.stdin.isTTY) {
// --interactive flag forces REPL
if (interactive || process.stdin.isTTY) {
startRepl(service, state, code)
} else {
let buffer = code || ''
Expand Down

0 comments on commit 6a32006

Please sign in to comment.