diff --git a/cmd/root.go b/cmd/root.go index fae9f05c05..13f74dd40c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -14,6 +14,7 @@ limitations under the License. package cmd import ( + "fmt" "os" "path/filepath" @@ -73,7 +74,7 @@ func init() { rootCmd.AddCommand(integration.IntegrationCmd) rootCmd.AddCommand(serve.ServeCmd) rootCmd.AddCommand(cache.CacheCmd) - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.k8sgpt.yaml)") + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", fmt.Sprintf("Default config file (%s/k8sgpt/k8sgpt.yaml)", xdg.ConfigHome)) rootCmd.PersistentFlags().StringVar(&kubecontext, "kubecontext", "", "Kubernetes context to use. Only required if out-of-cluster.") rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.") }