From 49e67f07441b9eff54e1eeb05ba6d145968b3900 Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Sun, 10 Feb 2019 20:28:01 +0200 Subject: [PATCH] Reword a bit docs and make more consistent and clear Signed-off-by: Alexander Nesterenko --- cmd/helm/init.go | 7 ++++--- cmd/helm/root.go | 6 +++--- pkg/helm/helmpath/default_home_dir.go | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 2c2761b09..3667031d8 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -36,9 +36,10 @@ import ( ) const initDesc = ` -This command sets up local configuration in $HELM_HOME (defaults to, based on system to: -$XDG_CONFIG_DIR/helm (default ~/.config/helm) on Linux, %APPDATA%\helm on Windows and -$HOME/Library/Preferences on OSX. +This command sets up local configuration in $HELM_HOME. It defaults to + - $XDG_CONFIG_HOME/helm (default $HOME/.config/helm) on Linux; + - %APPDATA%\helm on Windows and; + - $HOME/Library/Preferences on OSX. ` const ( diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 48c9e3c7b..fc57c1e13 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -46,12 +46,12 @@ Common actions from this point include: Environment: $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. - 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_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 diff --git a/pkg/helm/helmpath/default_home_dir.go b/pkg/helm/helmpath/default_home_dir.go index 12c908601..8f4c685d2 100644 --- a/pkg/helm/helmpath/default_home_dir.go +++ b/pkg/helm/helmpath/default_home_dir.go @@ -25,11 +25,11 @@ import ( // New default helm home, with different paths for different OS: // - %APPDATA%\helm on Windows -// - ~/Library/Preferences/helm on OSX -// - $XDG_CONFIG_DIR/helm (typically ~/.config/helm for linux) +// - $HOME/Library/Preferences/helm on OSX +// - $kXDG_CONFIG_HOME/helm (typically $HOME/.config/helm for Linux) 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") type DefaultConfigHomePath interface { @@ -44,7 +44,7 @@ func (FSConfigHomePath) xdgHomeExists() bool { return DirExists(defaultHelmHome) } -// Checks whether ~/.helm exists +// Checks whether $HOME/.helm exists func (FSConfigHomePath) basicHomeExists() bool { return DirExists(oldDefaultHelmHome) }