Skip to content

Commit

Permalink
fix(prompt): cursor not visible after error
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Aug 5, 2020
1 parent 7ed6424 commit 1de8a84
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/prompt/lib/generic-prompt.ts
Expand Up @@ -38,12 +38,9 @@ export abstract class GenericPrompt<T, V, S extends GenericPromptSettings<T, V>>

public async prompt(): Promise<T> {
try {
const result: T = await this.execute();
return await this.execute();
} finally {
this.screen.cursorShow();
return result;
} catch ( e ) {
this.screen.cursorShow();
throw e;
}
}

Expand Down

0 comments on commit 1de8a84

Please sign in to comment.