Skip to content

Commit cfb80a2

Browse files
committed
fix: enable terminal cursor when Ctrl+C during a prompt
1 parent 404a511 commit cfb80a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/common/prompter.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ export class Prompter implements IPrompter {
159159
output: this.muteStreamInstance,
160160
});
161161

162-
this.ctrlcReader.on("SIGINT", process.exit);
162+
this.ctrlcReader.on("SIGINT", () => {
163+
// enable terminal cursor
164+
process.stdout.write("\x1B[?25h");
165+
166+
process.exit();
167+
});
163168
}
164169
}
165170

0 commit comments

Comments
 (0)