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

fix: don't use os.Environ to override env #1629

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

wolfogre
Copy link
Member

If the env has been set in the yaml file, we shouldn't override it with os env.

@wolfogre wolfogre requested a review from a team as a code owner February 15, 2023 09:50
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #1629 (e92b6e0) into master (4989f44) will increase coverage by 0.66%.
The diff coverage is 75.93%.

@@            Coverage Diff             @@
##           master    #1629      +/-   ##
==========================================
+ Coverage   61.22%   61.88%   +0.66%     
==========================================
  Files          46       46              
  Lines        7141     7249     +108     
==========================================
+ Hits         4372     4486     +114     
+ Misses       2462     2459       -3     
+ Partials      307      304       -3     
Impacted Files Coverage Δ
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_pull.go 33.33% <ø> (ø)
pkg/container/docker_run.go 13.58% <ø> (ø)
pkg/container/docker_volume.go 0.00% <ø> (ø)
pkg/container/docker_images.go 27.02% <29.41%> (-4.13%) ⬇️
pkg/model/github_context.go 61.06% <32.00%> (-19.40%) ⬇️
pkg/container/docker_auth.go 51.35% <56.25%> (+3.73%) ⬆️
pkg/runner/runner.go 86.45% <66.66%> (-2.05%) ⬇️
pkg/runner/step.go 83.33% <75.00%> (+0.36%) ⬆️
... and 18 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

Thank you, Good catch.

at a later point of time, we should eventually move this code block into the Exec function of the HostEnvironment struct, so env vars defined in environ are not inside rc.Env. Like already done for the docker executor

@mergify mergify bot merged commit b0a5068 into nektos:master Feb 16, 2023
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