[GH-ISSUE #289] OSX: hostedtoolcache missing #203

Closed
opened 2026-03-01 21:41:12 +03:00 by kerem · 2 comments
Owner

Originally created by @boesing on GitHub (Jun 22, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/289

Hey there, I am getting the following error on my OSX machine.

[CI/Tests] ⭐  Run shivammathur/setup-php@v2
[CI/Tests]   ☁  git clone 'https://github.com/shivammathur/setup-php' # ref=v2
[CI/Tests]   🐳  docker cp src=/Users/act/.cache/act/shivammathur-setup-php@v2 dst=/actions/
[CI/Tests]   ❗  ::error::ENOENT: no such file or directory, open '/opt/hostedtoolcache/linux.sh'
[CI/Tests]   ❌  Failure - shivammathur/setup-php@v2

My workflow contains this step (which seems to cause the error):

steps:
      - uses: shivammathur/setup-php@v2
        with:
          php-version: '7.4'

Is there some kind of initialization process which has to be done to receive that linux.sh file?

Setup

Version of act: 0.2.9
Platform (Linux, macOS, Windows): macOS
The complete main.workflow file used:

name: CI
on: [push]

jobs:
  build:
    name: Tests
    runs-on: ubuntu-latest
    steps:
      - uses: shivammathur/setup-php@v2
        with:
          php-version: '7.4'
      - uses: actions/checkout@v2

      # Initialize composer cache
      - name: Get Composer Cache Directory
        id: composer-cache
        run: |
          echo "::set-output name=dir::$(composer config cache-files-dir)"

      - name: Cache Composer Downloads
        uses: actions/cache@v1
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            ${{ runner.os }}-composer-

      - name: Cache PHP dependencies
        uses: actions/cache@v1
        with:
          path: vendor
          key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}

      - uses: php-actions/composer@v1

The complete command that was executed

$ act

Any output from the command

[CI/Tests] 🚀  Start image=node:12.6-buster-slim
[CI/Tests]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/Tests]   🐳  docker cp src=/Users/max/git/github/kvb-api/. dst=/github/workspace
[CI/Tests] ⭐  Run shivammathur/setup-php@v2
[CI/Tests]   ☁  git clone 'https://github.com/shivammathur/setup-php' # ref=v2
[CI/Tests]   🐳  docker cp src=/Users/max/.cache/act/shivammathur-setup-php@v2 dst=/actions/
[CI/Tests]   ❗  ::error::ENOENT: no such file or directory, open '/opt/hostedtoolcache/linux.sh'
[CI/Tests]   ❌  Failure - shivammathur/setup-php@v2
Error: exit with `FAILURE`: 1
Originally created by @boesing on GitHub (Jun 22, 2020). Original GitHub issue: https://github.com/nektos/act/issues/289 Hey there, I am getting the following error on my OSX machine. ``` [CI/Tests] ⭐ Run shivammathur/setup-php@v2 [CI/Tests] ☁ git clone 'https://github.com/shivammathur/setup-php' # ref=v2 [CI/Tests] 🐳 docker cp src=/Users/act/.cache/act/shivammathur-setup-php@v2 dst=/actions/ [CI/Tests] ❗ ::error::ENOENT: no such file or directory, open '/opt/hostedtoolcache/linux.sh' [CI/Tests] ❌ Failure - shivammathur/setup-php@v2 ``` My workflow contains this step (which seems to cause the error): ``` steps: - uses: shivammathur/setup-php@v2 with: php-version: '7.4' ``` Is there some kind of initialization process which has to be done to receive that `linux.sh` file? # Setup Version of act: 0.2.9 Platform (Linux, macOS, Windows): macOS The complete main.workflow file used: ``` name: CI on: [push] jobs: build: name: Tests runs-on: ubuntu-latest steps: - uses: shivammathur/setup-php@v2 with: php-version: '7.4' - uses: actions/checkout@v2 # Initialize composer cache - name: Get Composer Cache Directory id: composer-cache run: | echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache Composer Downloads uses: actions/cache@v1 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-composer- - name: Cache PHP dependencies uses: actions/cache@v1 with: path: vendor key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }} - uses: php-actions/composer@v1 ``` The complete command that was executed ``` $ act ``` Any output from the command ``` [CI/Tests] 🚀 Start image=node:12.6-buster-slim [CI/Tests] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [CI/Tests] 🐳 docker cp src=/Users/max/git/github/kvb-api/. dst=/github/workspace [CI/Tests] ⭐ Run shivammathur/setup-php@v2 [CI/Tests] ☁ git clone 'https://github.com/shivammathur/setup-php' # ref=v2 [CI/Tests] 🐳 docker cp src=/Users/max/.cache/act/shivammathur-setup-php@v2 dst=/actions/ [CI/Tests] ❗ ::error::ENOENT: no such file or directory, open '/opt/hostedtoolcache/linux.sh' [CI/Tests] ❌ Failure - shivammathur/setup-php@v2 Error: exit with `FAILURE`: 1 ```
kerem closed this issue 2026-03-01 21:41:12 +03:00
Author
Owner

@shivammathur commented on GitHub (Jun 23, 2020):

@boesing
Please refer to https://github.com/shivammathur/setup-php#local-testing-setup for using nektos/act with setup-php.

<!-- gh-comment-id:647883791 --> @shivammathur commented on GitHub (Jun 23, 2020): @boesing Please refer to https://github.com/shivammathur/setup-php#local-testing-setup for using `nektos/act` with `setup-php`.
Author
Owner

@boesing commented on GitHub (Jun 23, 2020):

Thanks, @shivammathur
Obviously didn't read enough...

<!-- gh-comment-id:647988184 --> @boesing commented on GitHub (Jun 23, 2020): Thanks, @shivammathur Obviously didn't read enough...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#203
No description provided.