| 1 | // Copyright 2019 The Kubernetes Authors. |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | package commandutil |
| 5 | |
| 6 | import ( |
| 7 | "os" |
| 8 | ) |
| 9 | |
| 10 | // EnabkeAlphaCommmandsEnvName is the environment variable used to enable Alpha kustomize commands. |
| 11 | // If set to "true" alpha commands will be enabled. |
| 12 | const EnableAlphaCommmandsEnvName = "KUSTOMIZE_ENABLE_ALPHA_COMMANDS" |
| 13 | |
| 14 | // GetAlphaEnabled returns true if alpha commands should be enabled. |
| 15 | func GetAlphaEnabled() bool { |
| 16 | return os.Getenv(EnableAlphaCommmandsEnvName) == "true" |
| 17 | } |