From 69e51684d8eab7ea15b79abd434856a47421a03e Mon Sep 17 00:00:00 2001 From: nathan-nicholson Date: Tue, 10 Dec 2024 12:50:58 -0600 Subject: [PATCH] fix: remove the .kubefirst config file during reset Signed-off-by: nathan-nicholson --- cmd/reset.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/reset.go b/cmd/reset.go index 853afa4a..381010f0 100755 --- a/cmd/reset.go +++ b/cmd/reset.go @@ -107,6 +107,7 @@ func runReset() error { return fmt.Errorf("unable to get user home directory: %w", err) } k1Dir := fmt.Sprintf("%s/.k1", homePath) + kubefirstConfig := fmt.Sprintf("%s/.kubefirst", homePath) if err := utils.ResetK1Dir(k1Dir); err != nil { return fmt.Errorf("error resetting k1 directory: %w", err) @@ -131,6 +132,10 @@ func runReset() error { return fmt.Errorf("unable to delete %q folder, error: %w", k1Dir, err) } + if err := os.Remove(kubefirstConfig); err != nil { + return fmt.Errorf("unable to remove %q, error: %w", kubefirstConfig, err) + } + progressPrinter.IncrementTracker("removing-platform-content") time.Sleep(time.Second * 2) progress.Progress.Quit()