Agent Diagnostic
- Explored
tasks/scripts/gateway-vm.sh and tasks/scripts/gateway.sh
- Found
normalize_bool() on line 61 uses ${1,,} (Bash 4+ syntax)
- macOS ships Bash 3.2.57 which doesn't support this
- Confirmed
gateway.sh line 50 already uses the portable pattern:
printf '%s' "$1" | tr '[:upper:]' '[:lower:]'
- Applied the same
tr pattern to gateway-vm.sh and package-snap.sh
- Verified fix:
mise run gateway:vm starts successfully, microVM sandbox
boots and responds to exec commands on macOS 15 Apple Silicon
- Also found
package-snap.sh:62 has the same issue (lower priority, Linux-only)
Description
mise run gateway:vm fails immediately on macOS with stock Bash 3.2:
tasks/scripts/gateway-vm.sh: line 61: ${1,,}: bad substitution
The normalize_bool() function uses ${1,,} for case-insensitive matching, which requires Bash 4+. macOS ships Bash 3.2. The same function in gateway.sh already uses the portable tr pattern.
This blocks all macOS VM driver usage. The VM driver's primary dev target is Apple Silicon via Hypervisor.framework, and mise run gateway:vm is the only entry point.
Expected: gateway starts normally.
Reproduction Steps
- On macOS with stock bash (3.2.x), clone the repo
- Run
mise run gateway:vm
- Script exits immediately with:
bad substitution
Environment
- OS: macOS 15.5 (Apple Silicon)
- Bash: GNU bash 3.2.57(1)-release (arm64-apple-darwin25)
- OpenShell: 0.0.46-dev.1+g14c5329f (built from source, main branch)
- Docker: Docker 27.x via Colima (not relevant — script fails before driver init)
Logs
[gateway:vm] $ bash tasks/scripts/gateway-vm.sh
tasks/scripts/gateway-vm.sh: line 61: ${1,,}: bad substitution
[gateway:vm] ERROR task failed
Fix
Replace ${1,,} with $(printf '%s' "$1" | tr '[:upper:]' '[:lower:]') in:
tasks/scripts/gateway-vm.sh:61
tasks/scripts/package-snap.sh:62
This matches the existing portable pattern in gateway.sh:50.
Agent Diagnostic
tasks/scripts/gateway-vm.shandtasks/scripts/gateway.shnormalize_bool()on line 61 uses${1,,}(Bash 4+ syntax)gateway.shline 50 already uses the portable pattern:printf '%s' "$1" | tr '[:upper:]' '[:lower:]'trpattern togateway-vm.shandpackage-snap.shmise run gateway:vmstarts successfully, microVM sandboxboots and responds to exec commands on macOS 15 Apple Silicon
package-snap.sh:62has the same issue (lower priority, Linux-only)Description
mise run gateway:vmfails immediately on macOS with stock Bash 3.2:The
normalize_bool()function uses${1,,}for case-insensitive matching, which requires Bash 4+. macOS ships Bash 3.2. The same function ingateway.shalready uses the portabletrpattern.This blocks all macOS VM driver usage. The VM driver's primary dev target is Apple Silicon via Hypervisor.framework, and
mise run gateway:vmis the only entry point.Expected: gateway starts normally.
Reproduction Steps
mise run gateway:vmbad substitutionEnvironment
Logs
Fix
Replace
${1,,}with$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')in:tasks/scripts/gateway-vm.sh:61tasks/scripts/package-snap.sh:62This matches the existing portable pattern in
gateway.sh:50.