Skip to content

Commit

Permalink
fix: ensure service to update exists
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeStarks committed Aug 10, 2022
1 parent 8174d38 commit 47b6491
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/cli/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ func (c *ServiceCommand) Add(filepath string, update bool) {
}
}

// The service to be updated exists
if update && serviceToUpdate == "" {
fmt.Printf("No service named \"%s\". Do you mean to \"--add\"?\n", validatedConf.Name)
return
}

// Convert the configurations to a map type
// First, to json
jsondata, err := json.Marshal(validatedConf)
Expand Down

0 comments on commit 47b6491

Please sign in to comment.