Improve error message instead of panic

This commit is contained in:
David Dworken 2022-06-04 22:29:07 -07:00
parent 00f6bed62c
commit de606c52a7

View File

@ -603,7 +603,7 @@ func verifyBinaryMac(binaryPath string, downloadData shared.UpdateInfo) error {
} else if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
err = downloadFile(unsignedBinaryPath, downloadData.DarwinArm64UnsignedUrl)
} else {
panic("TODO: better error message")
err = fmt.Errorf("verifyBinaryMac() called for the unhandled branch GOOS=%s, GOARCH=%s", runtime.GOOS, runtime.GOARCH)
}
if err != nil {
return err