diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bfcf5e..63881a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [v1.3.2] - 2024-12-04 + - Fix auto update + ## [v1.3.1] - 2024-12-04 - Fix version name diff --git a/cmd/root.go b/cmd/root.go index c0ba56d..407345d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -43,7 +43,7 @@ func init() { rootCmd.CompletionOptions.HiddenDefaultCmd = true rootCmd.PersistentFlags().BoolVarP(&verbose.Verbose, "verbose", "", false, "Enable verbose logs") rootCmd.Flags().BoolVarP(&showVersion, "version", "v", false, "Print the version number of Mr. Smith") - rootCmd.PreRun = func(cmd *cobra.Command, args []string) { + rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { shared.RunCommand("go", "install", "github.com/mr-smith-org/mr@latest") } rootCmd.AddCommand(create.CreateCmd)