Skip to content

Commit 18203ad

Browse files
Copilotatifaziz
andcommitted
Address code review feedback: fix duplicate if-else and use & for script calls in PowerShell context
Co-authored-by: atifaziz <20511+atifaziz@users.noreply.github.com>
1 parent b0fab70 commit 18203ad

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
$packParams.VersionSuffix = $versionSuffix
8686
}
8787
88-
dotnet pwsh ./build.ps1 -Pack @packParams
88+
& ./build.ps1 -Pack @packParams
8989
if ($LASTEXITCODE) { throw "Pack failed" }
9090
9191
Get-ChildItem -File -Filter docopt.net.*.nupkg dist |

build.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ try {
115115
}
116116

117117
Write-Host "`n=== Running Tests ===" -ForegroundColor Green
118-
if ($NoBuild) {
119-
Invoke-DotNet 'test', '--no-build', '--configuration', $Configuration -AllowTestFailures
120-
} else {
121-
Invoke-DotNet 'test', '--no-build', '--configuration', $Configuration -AllowTestFailures
122-
}
118+
Invoke-DotNet 'test', '--no-build', '--configuration', $Configuration -AllowTestFailures
123119

124120
# Note: Roslyn 4.4 analyzer is validated through integration tests
125121
# that use the packed NuGet package containing both analyzer variants

tests/Integration/run.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ try
2424
}
2525
Remove-Item -Recurse -Force (Join-Path $props.RestorePackagesPath docopt.net) -ErrorAction SilentlyContinue
2626
if (!$noPack) {
27-
dotnet pwsh ../../build.ps1 -Pack -Configuration Release
27+
& ../../build.ps1 -Pack -Configuration Release
2828
if ($LASTEXITCODE) { throw }
2929
}
3030
Remove-Item bin, obj -Recurse -Force -ErrorAction SilentlyContinue

0 commit comments

Comments
 (0)