Skip to content

Commit

Permalink
fix(vfox add): install plugin null pointer
Browse files Browse the repository at this point in the history
Fixed missing error handling when adding plugins to vfox
  • Loading branch information
jan-bar committed Oct 12, 2024
1 parent 65ee668 commit 65b23bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ func (m *Manager) LookupSdkWithInstall(name string) (*Sdk, error) {
Show(); result {

manifest, err := m.fetchPluginManifest(m.GetRegistryAddress(name + ".json"))
if errors.Is(err, ManifestNotFound) {
return nil, fmt.Errorf("[%s] not found in remote registry, please check the name", pterm.LightRed(name))
if err != nil {
if errors.Is(err, ManifestNotFound) {
return nil, fmt.Errorf("[%s] not found in remote registry, please check the name", pterm.LightRed(name))
}
return nil, err
}

if err = m.Add(manifest.Name, manifest.DownloadUrl, ""); err != nil {
Expand Down

0 comments on commit 65b23bf

Please sign in to comment.