Skip to content

Commit

Permalink
refactor: "No need update" is not a fail. (#126)
Browse files Browse the repository at this point in the history
"No need update" is not a fail. No need to return error.
ctyytc authored Mar 20, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent 6cb0e73 commit aa08e8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/manager.go
Original file line number Diff line number Diff line change
@@ -201,7 +201,9 @@ func (m *Manager) Update(pluginName string) error {
}()
pterm.Println("Checking plugin version...")
if util.CompareVersion(source.Version, sdk.Plugin.Version) <= 0 {
return fmt.Errorf("the plugin is already the latest version")
success = true
pterm.Printf("the plugin is already the latest version")
return nil
}
err = os.WriteFile(sdk.Plugin.Filepath, []byte(content), 0644)
if err != nil {

0 comments on commit aa08e8c

Please sign in to comment.