Brew: command not found

Running any brew command in the dependencies => pre: section of circle.yml returns an error.

$ brew update
bash: line 1: brew: command not found

I have read that this could be due to a bad container see here.

What can we do to fix?

Oof: I just realized I need to be using a macOS build image for this to work, not Linux.