Skip to content

Commit f44c2a6

Browse files
committed
fix(client): catch and propagate client errors
When creating a client fails, the error is not caught and a nil client is sent to run the command, which results in a nil reference error. Fixes #4690
1 parent d830adf commit f44c2a6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

client/cmd/apps.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import (
2020
// AppCreate creates an app.
2121
func AppCreate(id string, buildpack string, remote string, noRemote bool) error {
2222
c, err := client.New()
23+
if err != nil {
24+
return err
25+
}
2326

2427
fmt.Print("Creating Application... ")
2528
quit := progress()

0 commit comments

Comments
 (0)