Only remove VCS if the package was removed successfully (#1041)

* Only remove VCS if the package was removed successfully

* Use := instead of var

* Fix formatting
This commit is contained in:
cominixo01 2019-10-05 16:20:20 -03:00 committed by J Guerreiro
parent fdcfeba902
commit a7619cce2b

8
cmd.go
View File

@ -282,8 +282,12 @@ func handleSync() error {
} }
func handleRemove() error { func handleRemove() error {
removeVCSPackage(cmdArgs.targets) err := show(passToPacman(cmdArgs))
return show(passToPacman(cmdArgs)) if err == nil {
removeVCSPackage(cmdArgs.targets)
}
return err
} }
// NumberMenu presents a CLI for selecting packages to install. // NumberMenu presents a CLI for selecting packages to install.