Skip to content

Use native variable validation#14

Merged
haampie merged 4 commits into
mainfrom
hs/fix/input-validation
May 20, 2026
Merged

Use native variable validation#14
haampie merged 4 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 haampie force-pushed the hs/fix/input-validation branch 2 times, most recently from af82ea1 to ea60e01 Compare May 15, 2026 10:19
Comment thread cc.sh Outdated
haampie added 3 commits May 20, 2026 10:14
* 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>
Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
@haampie haampie force-pushed the hs/fix/input-validation branch from ea60e01 to bdb5b93 Compare May 20, 2026 08:16
Signed-off-by: Harmen Stoppels <harmenstoppels@gmail.com>
Copy link
Copy Markdown
Collaborator

@kwryankrattiger kwryankrattiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@haampie haampie merged commit d36002c into main May 20, 2026
1 check passed
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.

2 participants