diff --git a/go/src/auxents/repl/prompt.go b/go/src/auxents/repl/prompt.go index 5aff36b9c..ddb470b41 100644 --- a/go/src/auxents/repl/prompt.go +++ b/go/src/auxents/repl/prompt.go @@ -20,12 +20,10 @@ const DEFAULT_PRIMARY_PROMPT = "[mlr] " const DEFAULT_SECONDARY_PROMPT = "" func getInputIsTerminal() bool { - if runtime.GOOS == "windows" { + if runtime.GOOS == "windows" && os.Getenv("MSYSTEM") != "" { // Sadly, term.IsTerminal doesn't work inside MSYS2 but does work - // outside MSYS2. Also sadly, I don't know how to tell the difference - // programatically between inside/outside MSYS2 here. So, as a - // workaround, I am simply defaulting to "is a terminal" here. Issues - // with regression-testing will need to be dealt with later. + // outside MSYS2. So in that case we simply return true so that the mlr + // repl has a prompt. return true } else { return term.IsTerminal(int(os.Stdin.Fd()))