Skip to content

Use native variable validation#14

Open
haampie wants to merge 3 commits into
mainfrom
hs/fix/input-validation
Open

Use native variable validation#14
haampie wants to merge 3 commits into
mainfrom
hs/fix/input-validation

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented May 15, 2026

  • Use null utility : ... to avoid execution
  • Use ${parameter:?[word]} to ensure the variable is set
  • Drop eval loop

The error message on Ubuntu reads:

dash: cc.sh: 205: SPACK_COMPILER_WRAPPER_PATH: Error: the compiler wrapper must be invoked from Spack
zsh: cc.sh:205: SPACK_COMPILER_WRAPPER_PATH: Error: the compiler wrapper must be invoked from Spack
bash: cc.sh: line 205: SPACK_COMPILER_WRAPPER_PATH: Error: the compiler wrapper must be invoked from Spack

Previously it was:

[spack cc]: Error: Spack compiler must be run from Spack! Input 'SPACK_COMPILER_WRAPPER_PATH' is missing.

haampie added 2 commits May 15, 2026 12:13
* Use null utility `: ...` to avoid execution
* Use `${parameter:?[word]}` to do ensure the variable is set
* Drop `eval` loop

The error message on Ubuntu reads:

> cc.sh: 205: SPACK_COMPILER_WRAPPER_PATH: Error: compiler wrapper must be invoked by Spack

Previously it was:

> [spack cc]: Error: Spack compiler must be run from Spack! Input 'SPACK_COMPILER_WRAPPER_PATH' is missing.

Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
@haampie haampie force-pushed the hs/fix/input-validation branch from bdecef3 to af82ea1 Compare May 15, 2026 10:18
Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
@haampie haampie force-pushed the hs/fix/input-validation branch from af82ea1 to ea60e01 Compare May 15, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant