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

Check for env variables for root cmd persistent flags #2143

Merged
merged 2 commits into from
May 17, 2019

Conversation

priyawadhwa
Copy link
Contributor

We were checking for environment variables for subcommands of
skaffold, but not the global flags that directly apply to the skaffold
root cmd.

This should allow us to also specify SKAFFOLD_FORCE_COLORS as an env
variable, fixing #2139.

I wasn't sure how to unit test this without changing the environment
variable locally, and I didn't want to risk messing up anyone's
configuration. However, I tested locally and the env variable seems to
be working now.

Priya Wadhwa added 2 commits May 16, 2019 15:34
We were checking for environment variables for subcommands of
`skaffold`, but not the global flags that directly apply to the `skaffold`
root cmd.

This should allow us to also specify `SKAFFOLD_FORCE_COLORS` as an env
variable, fixing GoogleContainerTools#2139.

I wasn't sure how to unit test this without changing the environment
variable locally, and I didn't want to risk messing up anyone's
configuration. However, I tested locally and the env variable seems to
be working now.
@codecov-io
Copy link

Codecov Report

Merging #2143 into master will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2143      +/-   ##
==========================================
- Coverage   56.31%   56.31%   -0.01%     
==========================================
  Files         180      180              
  Lines        7815     7819       +4     
==========================================
+ Hits         4401     4403       +2     
- Misses       2994     2995       +1     
- Partials      420      421       +1
Impacted Files Coverage Δ
cmd/skaffold/man/man.go 77.27% <100%> (ø) ⬆️
cmd/skaffold/app/cmd/cmd.go 73.33% <71.42%> (-0.93%) ⬇️

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 010c517...6dd6266. Read the comment docs.

@dgageot dgageot merged commit b44714b into GoogleContainerTools:master May 17, 2019
@priyawadhwa priyawadhwa deleted the forcecolors branch May 17, 2019 17:57
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.

4 participants