From b7d4602cb8aaaa0c22a0a5941d8c6edad7c58db4 Mon Sep 17 00:00:00 2001 From: Ali Mohsin Date: Mon, 26 Jun 2023 13:40:14 +0500 Subject: [PATCH] fix: displaying correct yaml config location on app start (#521) Signed-off-by: Ali Mohsin Co-authored-by: Alex Jones --- cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.") }