diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-18 12:02:21 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-18 12:02:21 +0500 |
| commit | c806e5e95b4f097c34622c07201b4aac45d8c897 (patch) | |
| tree | a90aaff6a4e58631288415f5384bcc237c9331b3 | |
| parent | workflows/test: add a zizmor job (diff) | |
| download | setup-clang-2.tar.gz setup-clang-2.zip | |
The $env:NAME syntax fails to produce an error if $NAME is not defined,
regardless of Set-StrictMode/Set-PSDebug.
Diffstat (limited to '')
| -rw-r--r-- | action.yml | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -34,16 +34,16 @@ runs: $linux_host = '${{ runner.os }}' -eq 'Linux' $windows_host = '${{ runner.os }}' -eq 'Windows' - $version = $env:ARG_VERSION + $version = (Get-ChildItem env:ARG_VERSION).Value $latest = $version -eq 'latest' - $x64 = $env:ARG_PLATFORM -eq 'x64' + $x64 = (Get-ChildItem env:ARG_PLATFORM).Value -eq 'x64' function Locate-Choco { $path = Get-Command 'choco' -ErrorAction SilentlyContinue if ($path) { $path.Path } else { - Join-Path ${env:ProgramData} 'chocolatey' 'bin' 'choco' + Join-Path (Get-ChildItem env:ProgramData).Value 'chocolatey' 'bin' 'choco' } } @@ -177,10 +177,10 @@ runs: $linux_host = '${{ runner.os }}' -eq 'Linux' $windows_host = '${{ runner.os }}' -eq 'Windows' - $cc = $env:ARG_CC -eq '1' + $cc = (Get-ChildItem env:ARG_CC).Value -eq '1' - $clang = $env:CLANG - $clangxx = $env:CLANGXX + $clang = (Get-ChildItem env:CLANG).Value + $clangxx = (Get-ChildItem env:CLANGXX).Value function Link-Exe { param( |
