Skip to content

Commit 3d9e5e6

Browse files
committed
Added "No Application Installed" Log When Updating & No Application is Installed
1 parent 1fc54a2 commit 3d9e5e6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/commands/update.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ func (cmd *UpdateCmd) Run() (err error) {
2222
// Variable which will hold if any app was updated.
2323
var howManyUpdates int = 0
2424

25-
fmt.Println("Checking For Updates")
26-
2725
if cmd.All { // if `update all`
2826
cmd.Targets, err = getAllTargets() // Load all the application info into targets
2927
if err != nil {
3028
return err
3129
}
3230
}
3331

32+
if len(cmd.Targets) == 0 {
33+
fmt.Println("No Application Installed")
34+
return nil
35+
}
36+
37+
fmt.Println("Checking For Updates")
3438
for _, target := range cmd.Targets {
3539
if len(strings.Split(target, "/")) < 2 {
3640
target = strings.ToLower(target + "/" + target)

0 commit comments

Comments
 (0)