diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh b/cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh index 501bac82c..2170c3686 100755 --- a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh +++ b/cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh @@ -2,6 +2,6 @@ echo $HELM_PLUGIN_NAME echo $HELM_PLUGIN_DIR echo $HELM_PLUGIN -echo $HELM_PATH_REPOSITORY_FILE -echo $HELM_PATH_REPOSITORY_CACHE +echo $HELM_REPOSITORY_CONFIG +echo $HELM_REPOSITORY_CACHE echo $HELM_BIN diff --git a/pkg/cli/environment.go b/pkg/cli/environment.go index 375726714..5f10fbeb0 100644 --- a/pkg/cli/environment.go +++ b/pkg/cli/environment.go @@ -99,16 +99,16 @@ func setFlagFromEnv(name, envar string, fs *pflag.FlagSet) { func (s *EnvSettings) setHelmEnvVars() { for key, val := range map[string]string{ - "HELM_HOME": helmpath.DataPath(), - "HELM_PATH_STARTER": helmpath.DataPath("starters"), - "HELM_DEBUG": fmt.Sprint(s.Debug), - "HELM_REGISTRY_CONFIG": s.RegistryConfig, - "HELM_PATH_REPOSITORY_FILE": s.RepositoryConfig, - "HELM_PATH_REPOSITORY_CACHE": s.RepositoryCache, - "HELM_PLUGIN": s.PluginsDirectory, - xdg.CacheHomeEnvVar: helmpath.CachePath(), - xdg.ConfigHomeEnvVar: helmpath.ConfigPath(), - xdg.DataHomeEnvVar: helmpath.DataPath(), + "HELM_HOME": helmpath.DataPath(), + "HELM_PATH_STARTER": helmpath.DataPath("starters"), + "HELM_DEBUG": fmt.Sprint(s.Debug), + "HELM_REGISTRY_CONFIG": s.RegistryConfig, + "HELM_REPOSITORY_CONFIG": s.RepositoryConfig, + "HELM_REPOSITORY_CACHE": s.RepositoryCache, + "HELM_PLUGIN": s.PluginsDirectory, + xdg.CacheHomeEnvVar: helmpath.CachePath(), + xdg.ConfigHomeEnvVar: helmpath.ConfigPath(), + xdg.DataHomeEnvVar: helmpath.DataPath(), } { if eVal := os.Getenv(key); len(eVal) > 0 { val = eVal diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index dc2cc02d2..35da606ea 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -224,11 +224,12 @@ func SetupPluginEnv(settings *cli.EnvSettings, name, base string) { "HELM_PLUGIN": settings.PluginsDirectory, // Set vars that convey common information. - "HELM_PATH_REPOSITORY_FILE": settings.RepositoryConfig, - "HELM_PATH_REPOSITORY_CACHE": settings.RepositoryCache, - "HELM_PATH_STARTER": helmpath.DataPath("starters"), - "HELM_HOME": helmpath.DataPath(), // for backwards compatibility with Helm 2 plugins - "HELM_DEBUG": fmt.Sprint(settings.Debug), + "HELM_REGISTRY_CONFIG": settings.RegistryConfig, + "HELM_REPOSITORY_CONFIG": settings.RepositoryConfig, + "HELM_REPOSITORY_CACHE": settings.RepositoryCache, + "HELM_PATH_STARTER": helmpath.DataPath("starters"), + "HELM_HOME": helmpath.DataPath(), // for backwards compatibility with Helm 2 plugins + "HELM_DEBUG": fmt.Sprint(settings.Debug), } { os.Setenv(key, val) }