Skip to content

Commit 6b94cff

Browse files
committed
Handle an empty BASHBREW_ARCH variable
1 parent 3ebdb4c commit 6b94cff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/bashbrew/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ func main() {
168168
constraints = c.GlobalStringSlice("constraint")
169169
exclusiveConstraints = c.GlobalBool("exclusive-constraints")
170170

171+
if arch == "" {
172+
// weird edge case... ("BASHBREW_ARCH=")
173+
arch = manifest.DefaultArchitecture
174+
}
175+
171176
var ok bool
172177
if ociArch, ok = architecture.SupportedArches[arch]; !ok {
173178
return fmt.Errorf("invalid architecture: %q", arch)

0 commit comments

Comments
 (0)