check error before defer close
parent
129e2fdb18
commit
e35f96d9e0
|
@ -204,10 +204,10 @@ func runStart(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
m, err := machine.NewAPIClient()
|
||||
defer m.Close()
|
||||
if err != nil {
|
||||
exit.WithError("Failed to get machine client", err)
|
||||
}
|
||||
defer m.Close()
|
||||
|
||||
// If --download-only, complete the remaining downloads and exit.
|
||||
if viper.GetBool(downloadOnly) {
|
||||
|
|
Loading…
Reference in New Issue