Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pwsh): wrap keyhandlers in try/finally #4420

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

JanDeDobbeleer
Copy link
Owner

@JanDeDobbeleer JanDeDobbeleer commented Nov 1, 2023

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Description

🤖 Generated by Copilot at 5a9632f

Fix transient prompt bug and improve code style in omp.ps1 script. The script now handles errors and breakpoints more gracefully and is easier to read.

How

🤖 Generated by Copilot at 5a9632f

  • Fix a bug where the transient prompt would not be restored after an error or a breakpoint in the debugger by adding a try-finally block around the script blocks for the Enter and Ctrl+c key handlers in omp.ps1 (link)
  • Improve the readability and consistency of the code in the Enter key handler by adding a blank line before and after the call to [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine() in omp.ps1 (link)

@JanDeDobbeleer JanDeDobbeleer enabled auto-merge (rebase) November 1, 2023 11:33
@JanDeDobbeleer JanDeDobbeleer merged commit 1f5d3ea into main Nov 1, 2023
14 checks passed
@JanDeDobbeleer JanDeDobbeleer deleted the pwsh-catch branch November 1, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant