Handle an empty BASHBREW_ARCH variable
This commit is contained in:
parent
3ebdb4c18f
commit
6b94cffe46
|
|
@ -168,6 +168,11 @@ func main() {
|
||||||
constraints = c.GlobalStringSlice("constraint")
|
constraints = c.GlobalStringSlice("constraint")
|
||||||
exclusiveConstraints = c.GlobalBool("exclusive-constraints")
|
exclusiveConstraints = c.GlobalBool("exclusive-constraints")
|
||||||
|
|
||||||
|
if arch == "" {
|
||||||
|
// weird edge case... ("BASHBREW_ARCH=")
|
||||||
|
arch = manifest.DefaultArchitecture
|
||||||
|
}
|
||||||
|
|
||||||
var ok bool
|
var ok bool
|
||||||
if ociArch, ok = architecture.SupportedArches[arch]; !ok {
|
if ociArch, ok = architecture.SupportedArches[arch]; !ok {
|
||||||
return fmt.Errorf("invalid architecture: %q", arch)
|
return fmt.Errorf("invalid architecture: %q", arch)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue