vexp-cli 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +11 -2
- package/mcp/mcp-server.cjs +127 -10
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -62,8 +62,17 @@ function ensureBinary() {
|
|
|
62
62
|
let replMode = false;
|
|
63
63
|
function runBinary(binaryPath, args) {
|
|
64
64
|
if (replMode) {
|
|
65
|
-
// In REPL mode, run synchronously and don't exit the process
|
|
66
|
-
|
|
65
|
+
// In REPL mode, run synchronously and don't exit the process.
|
|
66
|
+
// CRITICAL: stdin must be "ignore" (not "inherit") — inheriting stdin
|
|
67
|
+
// from a readline-managed process leaves the readline in a broken
|
|
68
|
+
// state after spawnSync returns. The child's stdin access during
|
|
69
|
+
// spawnSync causes the parent readline to see EOF, closing the
|
|
70
|
+
// interactive prompt. All Rust subcommands receive their args via
|
|
71
|
+
// CLI, never stdin, so ignoring it is safe.
|
|
72
|
+
const result = spawnSync(binaryPath, args, {
|
|
73
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
74
|
+
env: binaryEnv(binaryPath),
|
|
75
|
+
});
|
|
67
76
|
if (result.error) {
|
|
68
77
|
console.error(chalk.red(`Error: ${result.error.message}`));
|
|
69
78
|
}
|