Reword a bit docs and make more consistent and clear

Signed-off-by: Alexander Nesterenko <nestorf250@gmail.com>
pull/5166/head
Alexander Nesterenko 7 years ago
parent a1b4389577
commit 49e67f0744

@ -36,9 +36,10 @@ import (
) )
const initDesc = ` const initDesc = `
This command sets up local configuration in $HELM_HOME (defaults to, based on system to: This command sets up local configuration in $HELM_HOME. It defaults to
$XDG_CONFIG_DIR/helm (default ~/.config/helm) on Linux, %APPDATA%\helm on Windows and - $XDG_CONFIG_HOME/helm (default $HOME/.config/helm) on Linux;
$HOME/Library/Preferences on OSX. - %APPDATA%\helm on Windows and;
- $HOME/Library/Preferences on OSX.
` `
const ( const (

@ -46,12 +46,12 @@ Common actions from this point include:
Environment: Environment:
$HELM_HOME set an alternative location for Helm files. By default, these are stored in $HELM_HOME set an alternative location for Helm files. By default, these are stored in
"$XDG_CONFIG_DIR/helm" (typically ~/.config/helm) on Linux, "$XDG_CONFIG_HOME/helm" (typically "$HOME/.config/helm") on Linux,
"%APPDATA%\helm" on Windows and "$HOME/Library/Preferences" on OSX. "%APPDATA%\helm" on Windows and "$HOME/Library/Preferences" on OSX.
NOTE: if you have old-style "~/.helm" directory, it will be used. NOTE: if there is old-style "$HOME/.helm" directory, it will be used.
$HELM_DRIVER set the backend storage driver. Values are: configmap, secret, memory $HELM_DRIVER set the backend storage driver. Values are: configmap, secret, memory
$HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins.
$KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") $KUBECONFIG set an alternative Kubernetes configuration file (default "$HOME/.kube/config")
` `
// TODO: 'c helm.Interface' is deprecated in favor of actionConfig // TODO: 'c helm.Interface' is deprecated in favor of actionConfig

@ -25,11 +25,11 @@ import (
// New default helm home, with different paths for different OS: // New default helm home, with different paths for different OS:
// - %APPDATA%\helm on Windows // - %APPDATA%\helm on Windows
// - ~/Library/Preferences/helm on OSX // - $HOME/Library/Preferences/helm on OSX
// - $XDG_CONFIG_DIR/helm (typically ~/.config/helm for linux) // - $kXDG_CONFIG_HOME/helm (typically $HOME/.config/helm for Linux)
var defaultHelmHome = xdg.App{Name: "helm"}.ConfigPath("") var defaultHelmHome = xdg.App{Name: "helm"}.ConfigPath("")
// Old default helm home, it's old good ~/.helm // Old default helm home, it's old good $HELM/.helm
var oldDefaultHelmHome = filepath.Join(homedir.HomeDir(), ".helm") var oldDefaultHelmHome = filepath.Join(homedir.HomeDir(), ".helm")
type DefaultConfigHomePath interface { type DefaultConfigHomePath interface {
@ -44,7 +44,7 @@ func (FSConfigHomePath) xdgHomeExists() bool {
return DirExists(defaultHelmHome) return DirExists(defaultHelmHome)
} }
// Checks whether ~/.helm exists // Checks whether $HOME/.helm exists
func (FSConfigHomePath) basicHomeExists() bool { func (FSConfigHomePath) basicHomeExists() bool {
return DirExists(oldDefaultHelmHome) return DirExists(oldDefaultHelmHome)
} }

Loading…
Cancel
Save