Skip to content

Commit

Permalink
fix: remove the .kubefirst config file during reset
Browse files Browse the repository at this point in the history
Signed-off-by: nathan-nicholson <[email protected]>
  • Loading branch information
nathan-nicholson committed Dec 10, 2024
1 parent 72724fb commit 69e5168
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 69e5168

Please sign in to comment.