Skip to content

Commit

Permalink
Merge pull request #3976 from tstromberg/in_style
Browse files Browse the repository at this point in the history
Rename MINIKUBE_IN_COLOR to MINIKUBE_IN_STYLE
  • Loading branch information
tstromberg authored Mar 26, 2019
2 parents adc8cf0 + e878c1a commit 6469490
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/env_vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Some features can only be accessed by environment variables, here is a list of t

* **MINIKUBE_HOME** - (string) sets the path for the .minikube directory that minikube uses for state/configuration

* **MINIKUBE_IN_COLOR** - (bool) manually sets whether or not emoji and colors should appear in minikube. Set to false or 0 to disable this feature, true or 1 to force it to be turned on.
* **MINIKUBE_IN_STYLE** - (bool) manually sets whether or not emoji and colors should appear in minikube. Set to false or 0 to disable this feature, true or 1 to force it to be turned on.

* **MINIKUBE_WANTUPDATENOTIFICATION** - (bool) sets whether the user wants an update notification for new minikube versions

Expand All @@ -34,7 +34,7 @@ To make the exported variables permanent:
### Example: Disabling emoji

```shell
export MINIKUBE_IN_COLOR=false
export MINIKUBE_IN_STYLE=false
minikube start
```

Expand Down
2 changes: 1 addition & 1 deletion docs/vmdriver-none.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Some environment variables may be useful for using the `none` driver:
* **MINIKUBE_HOME**: Saves all files to this directory instead of $HOME
* **MINIKUBE_WANTUPDATENOTIFICATION**: Toggles the notification that your version of minikube is obsolete
* **MINIKUBE_WANTREPORTERRORPROMPT**: Toggles the error reporting prompt
* **MINIKUBE_IN_COLOR**: Toggles color output and emoji usage
* **MINIKUBE_IN_STYLE**: Toggles color output and emoji usage

## Known Issues

Expand Down
8 changes: 4 additions & 4 deletions pkg/minikube/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
// console.SetErrFile(os.Stderr)
// console.Fatal("Oh no, everything failed.")

// NOTE: If you do not want colorized output, set MINIKUBE_IN_COLOR=false in your environment.
// NOTE: If you do not want colorized output, set MINIKUBE_IN_STYLE=false in your environment.

var (
// outFile is where Out* functions send output to. Set using SetOutFile()
Expand All @@ -54,7 +54,7 @@ var (
// useColor is whether or not color output should be used, updated by Set*Writer.
useColor = false
// OverrideEnv is the environment variable used to override color/emoji usage
OverrideEnv = "MINIKUBE_IN_COLOR"
OverrideEnv = "MINIKUBE_IN_STYLE"
)

// fdWriter is the subset of file.File that implements io.Writer and Fd()
Expand Down Expand Up @@ -192,8 +192,8 @@ func SetErrFile(w fdWriter) {
func wantsColor(fd uintptr) bool {
// First process the environment: we allow users to force colors on or off.
//
// MINIKUBE_IN_COLOR=[1, T, true, TRUE]
// MINIKUBE_IN_COLOR=[0, f, false, FALSE]
// MINIKUBE_IN_STYLE=[1, T, true, TRUE]
// MINIKUBE_IN_STYLE=[0, f, false, FALSE]
//
// If unset, we try to automatically determine suitability from the environment.
val := os.Getenv(OverrideEnv)
Expand Down

0 comments on commit 6469490

Please sign in to comment.