diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb360baa..99df98e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,9 +212,9 @@ jobs: - name: Install macOS dependencies if: startsWith(matrix.os, 'macos-') run: | - brew install bison boost libogg ninja pkg-config qt5 + brew install bison boost gfortran libogg ninja pkg-config qt5 brew link qt5 --force - echo "FC=gfortran-11" >> ${GITHUB_ENV} + echo "FC=/opt/homebrew/bin/gfortran" >> ${GITHUB_ENV} echo "YACC=/opt/homebrew/opt/bison/bin/bison" >> ${GITHUB_ENV} echo "CPATH=/opt/homebrew/include" >> ${GITHUB_ENV} echo "LIBRARY_PATH=/opt/homebrew/lib" >> ${GITHUB_ENV} diff --git a/bfg9000/tools/msvc/__init__.py b/bfg9000/tools/msvc/__init__.py index 5845af5e..6caf708c 100644 --- a/bfg9000/tools/msvc/__init__.py +++ b/bfg9000/tools/msvc/__init__.py @@ -90,8 +90,13 @@ def _parse_brand(env, command, version_output): @staticmethod def check_command(env, command): - return env.execute(command + ['-?'], stdout=shell.Mode.pipe, - stderr=shell.Mode.stdout) + output = env.execute(command + ['-?'], stdout=shell.Mode.pipe, + stderr=shell.Mode.stdout) + # XXX: The `templight` tool exits with zero status even though it + # properly reports that it doesn't understand the "-?" option. + if 'error: unknown argument' in output: + raise shell.CalledProcessError(1, output) + return output @property def flavor(self):