Skip to content

flows: support env vars in hook scripts#543

Open
ThVerg wants to merge 1 commit into
olofk:mainfrom
ThVerg:feat/flow-hook-env
Open

flows: support env vars in hook scripts#543
ThVerg wants to merge 1 commit into
olofk:mainfrom
ThVerg:feat/flow-hook-env

Conversation

@ThVerg

@ThVerg ThVerg commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The flow API silently drops the env key of EDAM hook scripts — Edaflow.add_scripts() has the support commented out with a # FIXME : Add env vars marker, while the legacy tool API honors env in _run_scripts().

EdaCommands.Command already has a variables mechanism that the make build runner turns into an env KEY=value command prefix, so this just passes script.get("env", {}) through it and removes the FIXME and the commented-out code.

Includes a test verifying that a pre_build hook with env: {FOO: bar} produces env FOO=bar echo hello in the generated Makefile (205 tests pass).

The flow API silently dropped the 'env' key of EDAM hook scripts
(marked FIXME in add_scripts), while the legacy tool API honors it.
Pass the env dict through EdaCommands' existing variables mechanism,
which emits an 'env KEY=value' prefix in the generated Makefile.

Add a test that a pre_build hook with env ends up prefixed in the
Makefile.
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