Skip to content

Commit

Permalink
Exit when user-choice to terminate
Browse files Browse the repository at this point in the history
Co-authored-by: Vedant Mohan Goyal <83997633+vedantmgoyal2009@users.noreply.github.com>
  • Loading branch information
Trenly and vedantmgoyal9 committed Oct 6, 2021
1 parent 47fa946 commit 76d586b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Tools/YamlCreate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1811,8 +1811,7 @@ if ($ScriptSettings.ContinueWithExistingPRs -ne 'always') {
if ($PRApiResponse.total_count -gt 0) {
$_PRUrl = $PRApiResponse.items.html_url
$_PRTitle = $PRApiResponse.items.title
if ($ScriptSettings.ContinueWithExistingPRs -eq 'never') { throw "Existing PR Found - $_PRUrl" }

if ($ScriptSettings.ContinueWithExistingPRs -eq 'never') { Write-Host -ForegroundColor Red "Existing PR Found - $_PRUrl"; exit }
$_menu = @{
entries = @('[Y] Yes'; '*[N] No')
Prompt = 'There may already be a PR for this change. Would you like to continue anyways?'
Expand Down

0 comments on commit 76d586b

Please sign in to comment.