mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-12 18:15:48 +00:00
fix(prompt): add stdin.pause() to prevent process hang after password input
Fixes #236. The password() method called resume() on stdin but never paused it in cleanup, keeping the event loop alive indefinitely.
This commit is contained in:
1 parent
a24ae6ab3b
commit
f30d0c1239
1 file changed
+1
@@ -174,6 +174,7 @@ export class InteractivePrompt {
|
|||||||
process.stdin.setRawMode(false);
|
process.stdin.setRawMode(false);
|
||||||
}
|
}
|
||||||
process.stdin.removeListener('data', onData);
|
process.stdin.removeListener('data', onData);
|
||||||
|
process.stdin.pause();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onData = (data: Buffer): void => {
|
const onData = (data: Buffer): void => {
|
||||||
|
|||||||
Reference in new issue
Block a user