Skip to content

Commit 6cb2db4

Browse files
committed
[poc_windows_x86_64_compile] Fix Check if rust is installed before uninstall
1 parent a9ac7bc commit 6cb2db4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/poc-agent-build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
rustup default stable-x86_64-pc-windows-msvc
2727
2828
- name: Uninstall Rust with Chocolatey
29+
shell: pwsh
2930
run: |
30-
if command -v rustc > /dev/null; then
31+
if (Get-Command rustc -ErrorAction SilentlyContinue) {
3132
rustc --version
3233
choco uninstall -y rust
33-
else
34-
echo "Rust is not installed."
35-
fi
34+
} else {
35+
Write-Host "Rust is not installed."
36+
}
3637
3738
- name: Install MinGW and NSIS with Chocolatey
3839
run: choco install -y mingw nsis

0 commit comments

Comments
 (0)