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

Rename MINIKUBE_IN_COLOR to MINIKUBE_IN_STYLE #3976

Merged
merged 1 commit into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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