spec-runner 1.1.8 → 1.1.9
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/bin/spec-runner-installer.js +11 -1
- package/package.json +1 -1
|
@@ -119,7 +119,17 @@ function isTTY() {
|
|
|
119
119
|
|
|
120
120
|
function promptLine(question) {
|
|
121
121
|
process.stdout.write(question);
|
|
122
|
-
|
|
122
|
+
// stdin (fd 0) may be in non-blocking mode (EAGAIN); read from /dev/tty directly
|
|
123
|
+
try {
|
|
124
|
+
const { execSync } = require("child_process");
|
|
125
|
+
const result = execSync('IFS= read -r REPLY < /dev/tty && printf "%s" "$REPLY"', {
|
|
126
|
+
shell: "/bin/sh",
|
|
127
|
+
stdio: ["ignore", "pipe", "inherit"],
|
|
128
|
+
});
|
|
129
|
+
return String(result || "").trim();
|
|
130
|
+
} catch {
|
|
131
|
+
return String(fs.readFileSync(0, "utf8") || "").trim();
|
|
132
|
+
}
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
function promptTargetInteractive() {
|