summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-18 12:02:21 +0500
committerEgor Tensin <egor@tensin.name>2026-10-18 12:02:21 +0500
commitc806e5e95b4f097c34622c07201b4aac45d8c897 (patch)
treea90aaff6a4e58631288415f5384bcc237c9331b3
parentworkflows/test: add a zizmor job (diff)
downloadsetup-clang-2.3.3.tar.gz
setup-clang-2.3.3.zip
fail on unset environment variablesHEADv2.3.3v2.3v2master
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.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/action.yml b/action.yml
index e45b0f1..1a0af3c 100644
--- a/action.yml
+++ b/action.yml
@@ -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(