Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing environment variables to execSandboxed #1703

Merged
merged 3 commits into from
Oct 31, 2020

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Oct 30, 2020

This allows to pass extra environment variables to execSandboxed in
preparation for a fix for #1698. It also changes how environment
variables are used if firejail is enabled. All environment variables
(those from the config and those passed to execSandboxed) are
now passed via the --env parameter of the firejail command instead of
injecting them into the environment. This has been suggested earlier in
#337 (comment) by @mwz.

This allows to pass extra environment variables to `execSandboxed` in
preparation for a fix for #1698. It also changes how environment
variables are used if firejail is enabled. All environment variables
(those from the config and those passed to `execSandboxed`) are
now passed via the `--env` parameter of the firejail command instead of
injecting them into the environment. This has been suggested earlier in
#337 (comment) by @mwz.
@codecov
Copy link

codecov bot commented Oct 30, 2020

Codecov Report

Merging #1703 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1703      +/-   ##
==========================================
+ Coverage   73.84%   73.91%   +0.06%     
==========================================
  Files         115      115              
  Lines        1946     1951       +5     
  Branches       52       58       +6     
==========================================
+ Hits         1437     1442       +5     
  Misses        509      509              
Impacted Files Coverage Δ
...in/scala/org/scalasteward/core/io/ProcessAlg.scala 100.00% <100.00%> (ø)
.../main/scala/org/scalasteward/core/io/process.scala 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1f7a98...2c33947. Read the comment docs.

@fthomas
Copy link
Member Author

fthomas commented Oct 31, 2020

The last commit also clears the inherited environment if firejail is used. This closes #595.

@fthomas fthomas linked an issue Oct 31, 2020 that may be closed by this pull request
@fthomas fthomas added this to the 0.8.0 milestone Oct 31, 2020
@fthomas fthomas added the enhancement New feature or request label Oct 31, 2020
@fthomas fthomas merged commit 860df30 into master Oct 31, 2020
@fthomas fthomas deleted the topic/execSandbox-env branch October 31, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

execSandboxed should not inherit environment variables
1 participant