pnpm / action-setup

Install pnpm package manager
https://github.com/marketplace/actions/setup-pnpm
MIT License
887 stars 84 forks source link

The action breaks the container environment in the openSUSE #116

Closed ueokande closed 6 months ago

ueokande commented 6 months ago

When I use the action in the openSUSE container, the action breaks the environment after using pnpm/action-setup. I cannot run any commands with run directive. The job fails with the following error:

CI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown

I guess GitHub Actions execute sh internally when we use container for a job.

Here is a minimal GitHub Action manifest to reproduce the issue. The id command run successfully, before and after pnpm/action-setup, in the Fedora and Debian container. For the openSUSE, the id command run successfully before pnpm/action-setup`, but the command fails after using the action.

name: 'build-test'
on:
  push:

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        container:
          - fedora
          - debian
          - opensuse/leap
    runs-on: ubuntu-latest
    container: ${{ matrix.container }}
    steps:
      - name: prepare package.json
        run: |
          echo '{ "packageManager": "pnpm@8.15.3" }' >package.json
      - run: id
      - uses: pnpm/action-setup@v3
      - run: id  # <-- command fails here

See the result in the GitHub Actions

ueokande commented 6 months ago

I found this issues does not related to the pnpm/action-setup. I've tried with the following steps, and the job outputs same error. The OpenSUSE docker image does not work well on the GitHub Actions. Maybe addPath() affects the $PATH?

steps:
  - run: id
  - uses: actions/setup-node@v3
    with:
      node-version: 20
  - run: id

Let me close this issue. Thanks!