From 6c9db0f034a1deacab9532291fead04740db749b Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 20 May 2023 11:10:40 -0400 Subject: fix: cli input prompt should be printed to stderr, not stdout --- forth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forth.js b/forth.js index 54b9d1d..a169ca6 100644 --- a/forth.js +++ b/forth.js @@ -147,7 +147,7 @@ if (typeof window !== 'undefined') { // browser UI } else { // UI if NodeJS const readline = require('readline'); - const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); + const rl = readline.createInterface({ input: process.stdin, output: process.stderr }); const prompt = (query) => new Promise((resolve) => rl.question(query, resolve)); const m = forth(); (async () => { -- cgit v1.2.3