Skip to content

Commit

Permalink
Fix repl exit
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Oct 16, 2024
1 parent eb943c2 commit 26829d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export function setSpinner(ora: Ora) {
export function getPrompt(): string | null {
const response = prompt(brightBlue(`Enter a message: `));

if (response === "/bye") {
// null occurs with ctrl+c
if (response === "/bye" || response === null) {
Deno.exit(0);
}

Expand Down

0 comments on commit 26829d0

Please sign in to comment.