@tarcisiopgs/lisa 1.22.0 → 1.22.1
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/index.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -545,16 +545,18 @@ function startOverseer(proc, cwd, config2, getSnapshot = getGitSnapshot) {
|
|
|
545
545
|
import { spawn } from "child_process";
|
|
546
546
|
import { platform } from "os";
|
|
547
547
|
var ANSI_REGEX = /\x1b(?:\[[0-9;?]*[a-zA-Z]|\][^\x07]*\x07|\([A-Z0-9]|[A-Z])/g;
|
|
548
|
+
var CTRL_D_REGEX = /\x04/g;
|
|
548
549
|
function stripAnsi(text2) {
|
|
549
|
-
return text2.replace(ANSI_REGEX, "").replace(/\r\n/g, "\n").replace(/\r/g, "");
|
|
550
|
+
return text2.replace(ANSI_REGEX, "").replace(CTRL_D_REGEX, "").replace(/\r\n/g, "\n").replace(/\r/g, "");
|
|
550
551
|
}
|
|
551
552
|
function buildPtyArgs(command, os) {
|
|
552
553
|
const currentOs = os ?? platform();
|
|
554
|
+
const wrappedCommand = `${command} < /dev/null`;
|
|
553
555
|
if (currentOs === "darwin") {
|
|
554
|
-
return { file: "script", args: ["-qF", "/dev/null", "sh", "-c",
|
|
556
|
+
return { file: "script", args: ["-qF", "/dev/null", "sh", "-c", wrappedCommand] };
|
|
555
557
|
}
|
|
556
558
|
if (currentOs === "linux") {
|
|
557
|
-
return { file: "script", args: ["-qef", "-c",
|
|
559
|
+
return { file: "script", args: ["-qef", "-c", wrappedCommand, "/dev/null"] };
|
|
558
560
|
}
|
|
559
561
|
return null;
|
|
560
562
|
}
|