Skip to content

Commit

Permalink
Allow invalid remote servers to be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Feb 14, 2024
1 parent 46d0d8b commit 723e9a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/ficsitcli/remote_servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ func (f *ficsitCLI) RemoveRemoteServer(path string) error {
if !ok {
return fmt.Errorf("installation not found")
}
if metadata.Info == nil || metadata.Info.Location != common.LocationTypeRemote {
if metadata.State == InstallStateLoading {
return fmt.Errorf("installation is still loading")
}
if metadata.Info != nil && metadata.Info.Location != common.LocationTypeRemote {
return fmt.Errorf("installation is not remote")
}
err := f.ficsitCli.Installations.DeleteInstallation(path)
Expand Down

0 comments on commit 723e9a6

Please sign in to comment.