Skip to content

Commit f7c5e0e

Browse files
feat: resolve error return value
1 parent 9250808 commit f7c5e0e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/stack/options.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ func ConfigFromOptions() (*Config, error) {
5151
sName := stack // Default to the supplied stack
5252
if sName == "" {
5353
stacks, err := GetStacks()
54-
cobra.CheckErr(err)
54+
if err != nil {
55+
return nil, err
56+
}
5557

5658
if len(stacks) == 1 {
5759
// If there is only one stack use that
@@ -62,7 +64,10 @@ func ConfigFromOptions() (*Config, error) {
6264
Message: "Which stack do you wish to deploy?",
6365
Options: stacks,
6466
}, &sName)
65-
cobra.CheckErr(err)
67+
68+
if err != nil {
69+
return nil, err
70+
}
6671
}
6772
}
6873

0 commit comments

Comments
 (0)