Skip to content

Set use_default_shell_env = False on per_file rule - #280

Draft
furtib wants to merge 4 commits into
Ericsson:mainfrom
furtib:add-usr-bin-to-default-path
Draft

Set use_default_shell_env = False on per_file rule#280
furtib wants to merge 4 commits into
Ericsson:mainfrom
furtib:add-usr-bin-to-default-path

Conversation

@furtib

@furtib furtib commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Why:
We want our actions to run without use_default_shell_env = True.

What:

  • Update the comment on the workaround.
  • Set use_default_shell_env to false on per_file rule.

Note:
Fails on Jenkins.

Addresses:
none

@furtib
furtib requested a review from Szelethus August 12, 2026 12:52
@furtib furtib self-assigned this Aug 12, 2026
@furtib furtib added the non-functional change ☮️ The patch doesn't change any functionality, e.g. refactoring, documentation, test-only. label Aug 12, 2026
Comment thread src/codechecker_script.py Outdated
@furtib
furtib requested a review from Szelethus August 12, 2026 13:17

@Szelethus Szelethus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread src/codechecker_script.py Outdated
if "PATH" not in env:
env["PATH"] = "/bin" # NOTE: this is workaround for CodeChecker 6.24.4
# NOTE: this is workaround for CodeChecker
env["PATH"] = "/usr/local/bin:/usr/bin:/bin"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This does not look correct to me.
From Bazel perspective we must not do that.
So, why do we?

@furtib furtib Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After further experimentation, it seems like CodeChecker never actually uses any tool from PATH; it just needs it to be set.

I need time for further testing.

@furtib
furtib requested review from Szelethus and nettle August 13, 2026 07:56
@furtib furtib changed the title Add /usr/bin and /usr/local/bin to the default/fallback PATH Set use_default_shell_env = False on per_file rule Aug 13, 2026
@furtib
furtib marked this pull request as draft August 13, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

non-functional change ☮️ The patch doesn't change any functionality, e.g. refactoring, documentation, test-only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants