aminya / setup-cpp

Install all the tools required for building and testing C++/C projects.
Apache License 2.0
185 stars 27 forks source link

Error: Command failed with ENOENT: /usr/local/bin/brew install make #247

Closed lczech closed 4 days ago

lczech commented 4 months ago

The following GitHub Actions workflow fails under os: macos-latest

uses: aminya/setup-cpp@v0.37.0
with:
  compiler: ${{ matrix.compiler }}
  cmake: true
  make: true

with the error Error: Command failed with ENOENT: /usr/local/bin/brew install make

In more detail:

Run aminya/setup-cpp@v0.37.0
  with:
    compiler: gcc
    cmake: true
    make: true
    timeout: 20
Installing cmake true
  Installing cmake 3.28.1 arm64 via direct downloading
  Download cmake 3.28.1
  Trying https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1-macos-universal.tar.gz #1 at 3:37:19 PM
  Installing extraction dependencies
  Extracting /Users/runner/work/_temp/5fd0404b-e7a3-4250-988a-41452e78260e to /Users/runner/cmake
  /usr/bin/tar xz -C /Users/runner/cmake -f /Users/runner/work/_temp/5fd0404b-e7a3-4250-988a-41452e78260e
  Add /Users/runner/cmake/cmake-3.28.1-macos-universal/CMake.app/Contents/bin/ to PATH
took 5 seconds
Installing make true
  Installing make  via brew
  Error: Error: Command failed with ENOENT: /usr/local/bin/brew install make
  spawnSync /usr/local/bin/brew ENOENT
took 0 seconds
✅ cmake was installed successfully:
- The installation directory is /Users/runner/cmake/cmake-3.28.1-macos-universal
- The binary directory is /Users/runner/cmake/cmake-3.28.1-macos-universal/CMake.app/Contents/bin/
Error: make failed to install
setup-cpp finished

This could be an issue with npm, see here

Cheers and thanks in advance for any hints on how to solve this! Lucas

Upvote & Fund

@aminya is using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.

Thank you in advance for helping prioritize & fund our backlog!


Fund with Polar

aminya commented 4 months ago

There's a check to determine if brew is installed. Not sure why this error is being triggered.

https://github.com/aminya/setup-cpp/blob/34bb7838132719f0db8a21d1b1c805d39f21977d/src/utils/setup/setupBrewPack.ts#L19

https://github.com/aminya/setup-cpp/blob/34bb7838132719f0db8a21d1b1c805d39f21977d/src/make/make.ts#L18

aminya commented 4 days ago

Fixed in v0.41.0. Now, Arm MacOS is fully tested and supported.