I want to create a script to setup an environment on a Mac. Here's a simple sample...
#!/bin/bash
brew install gcovr || exit 1
gcovr --version
NOTE: Script assumes
brew
was previously installed .
When I execute the script I get an error.
$ ./install
Warning: gcovr 4.1 is already installed and up-to-date
To reinstall 4.1, run `brew reinstall gcovr`
Traceback (most recent call last):
File "/usr/local/Cellar/gcovr/4.1/libexec/bin/gcovr", line 6, in <module>
from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'
However, if I run it directly from the command line, it progresses as expected.
$ brew install gcovr
Warning: gcovr 4.1 is already installed and up-to-date
To reinstall 4.1, run `brew reinstall gcovr`
It should be noted, the script does install gcovr
before failing and bailing.