Skip to content

add --lenient-env-parsing flag, so new lines are treated as continuation from the env var, and not discarded with error.#6045

Open
Propfend wants to merge 4 commits intonektos:masterfrom
intentee:lenient_env_parsing
Open

add --lenient-env-parsing flag, so new lines are treated as continuation from the env var, and not discarded with error.#6045
Propfend wants to merge 4 commits intonektos:masterfrom
intentee:lenient_env_parsing

Conversation

@Propfend
Copy link
Copy Markdown

When running act locally with an action like ORT environment variables are not preserved between steps; eg. analyzer, evaluator, because act parsing of environment variables seems to be even stricter than GHA's, so my action just fails locally, although it does not fail in GitHub actioins itself. I added this flag so this more lenient parsing is optional.

…ation from the env var, and not discarded with error.
@panekj
Copy link
Copy Markdown
Contributor

panekj commented Mar 28, 2026

If act has different behaviour from GitHub then I would say that is a bug and it should be fixed rather than creating a new CLI option. Is this something that changed in GHA?

@pull-request-size pull-request-size Bot added size/S and removed size/M labels Mar 30, 2026
@Propfend
Copy link
Copy Markdown
Author

Propfend commented Mar 30, 2026

Yes, i agree. I just didnt know if that behaviour was on purpose, but yes, it parses differently from github. Ive changed so it will parse like this by default, without flag. What do you think about that? Thanks for the attention.

@Propfend
Copy link
Copy Markdown
Author

If that helps, using this project:

https://github.com/ChristopherHX/runner.server

works for me, confirming that act actually parses the ENV vars differently from github.

@ChristopherHX
Copy link
Copy Markdown
Contributor

I was not even aware of this feature, so I missed this detail as well in the parsing function. :)

I always expected that only heredoc style is possible for multine.


Not adding a cli option is good then

@ChristopherHX
Copy link
Copy Markdown
Contributor

I think we still need a test for this feature, to ensure that this works as expected

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.96%. Comparing base (bd4bc99) to head (e81b4f2).
⚠️ Report is 41 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6045      +/-   ##
==========================================
+ Coverage   74.65%   76.96%   +2.30%     
==========================================
  Files          73       74       +1     
  Lines       11139     9321    -1818     
==========================================
- Hits         8316     7174    -1142     
+ Misses       2186     1506     -680     
- Partials      637      641       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pull-request-size pull-request-size Bot added size/L and removed size/S labels Mar 30, 2026
@Propfend
Copy link
Copy Markdown
Author

done

@mergify mergify Bot added the needs-work Extra attention is needed label Mar 30, 2026
@mergify mergify Bot removed the needs-work Extra attention is needed label Mar 30, 2026
@ChristopherHX
Copy link
Copy Markdown
Contributor

Looks good so far, thanks. Checking this later myself against GitHubs behavior to double ckeck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants