nickjj / docker-flask-example

A production ready example Flask app that's using Docker and Docker Compose.
MIT License
583 stars 101 forks source link

unbound variable on macos ventura #12

Closed luis-echegaray closed 1 year ago

luis-echegaray commented 1 year ago

❯ ./run quality ./run: line 55: @: unbound variable

❯ ./run lint:dockerfile ./run: line 44: @: unbound variable

Solution

brew install bash

this currently takes you from: GNU bash, version 3.2.57(1)-release (arm64-apple-darwin22) to GNU bash, version 5.2.2(1)-release (aarch64-apple-darwin22.1.0)

nickjj commented 1 year ago

Hi,

Thanks. I have noticed this too and can reproduce the behavior.

This stems from setting set -o nounset near the top of the run script.

I haven't been able to figure out a good solution to this that works with Bash 3.2.X that doesn't make things super convoluted. I'm open for suggestions if anyone has them.

nickjj commented 1 year ago

Since then I've removed that option since it fails out of the box on macOS. Now it works with Bash 3.2.