add sudo to advice and fix panic

pull/16643/head
Steven Powell 2023-06-06 15:09:59 -07:00
parent e0442f35ec
commit 261c8bd8a2
2 changed files with 6 additions and 5 deletions

View File

@ -495,9 +495,10 @@ func (d *Driver) Start() error {
time.Sleep(2 * time.Second)
}
if isBootpdError(err) {
exit.Error(reason.IfBootpdFirewall, "ip not found", err)
} else if err != nil {
if err != nil {
if isBootpdError(err) {
exit.Error(reason.IfBootpdFirewall, "ip not found", err)
}
return errors.Wrap(err, "IP address never found in dhcp leases file")
}
log.Debugf("IP: %s", d.IPAddress)

View File

@ -401,8 +401,8 @@ var (
ID: "ID_BOOTPD_FIREWALL",
ExitCode: ExLocalNetworkError,
Advice: translate.T(`Your firewall is likely blocking bootpd, to unblock it run:
/usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
/usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd`),
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd`),
}
// minikube failed to cache kubernetes binaries for the current runtime