Skip to content

Commit a42d7e8

Browse files
committed
Fix a bug where build --push would not work if kind nodes were stopped.
1 parent 1b1ac51 commit a42d7e8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

commands/build.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func buildCommandAction(cliContext *cli.Context) error {
4646
}
4747
registry, registryInsecure, err = getRegistry()
4848
if err != nil {
49-
return cli.NewExitError(fmt.Sprintf("you specified --push, but a registry was not found: %s. Try sanic deploy first.", err.Error()), 1)
49+
return cli.NewExitError(fmt.Sprintf("you specified --push, but a registry was not found: %s. Try \"sanic deploy\" first.", err.Error()), 1)
5050
}
5151
}
5252

provisioners/localdev/localdev.go

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ func (provisioner *ProvisionerLocalDev) Registry() (registryAddr string, registr
7070
if err != nil {
7171
return
7272
}
73+
if ip == "" {
74+
err = fmt.Errorf("the control plane was not running.")
75+
return
76+
}
77+
7378
registryAddr = fmt.Sprintf("%s:%d", ip, RegistryNodePort)
7479
registryInsecure = true
7580
return

0 commit comments

Comments
 (0)