[GH-ISSUE #214] Shell settings not used? #145

Closed
opened 2026-03-01 21:40:38 +03:00 by kerem · 1 comment
Owner

Originally created by @kai-tub on GitHub (Apr 28, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/214

Hi,
first of all thanks for providing such an awesome library!

I am using a container to run all steps of a job, which doesn't offer a bash environment:
My workflow file looks something like this:

on:
  push:
    branches: [ master ]

jobs:
  test:
      name: Test and build latex documents
      runs-on: ubuntu-latest
      # runs all of the steps inside the specified container rather than on the VM host.
      # Bonus: The latest alpine image, which texlive is based on also integrates python3
      container:
        image: xucheng/texlive-small:latest
     # Reconfigure all following shells to use sh and not bash
      defaults:
        run:
          shell: sh
      steps:
          - name: Set up Git
            uses: actions/checkout@v2
          - name: Echo
            run: echo Hello

Which will fail with the following error message:
starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

It works on GitHub. The problem seems to be caused by act not saving using the default values. If I set the shell on a per run basis like:

- name: Echo
  run: echo Hello
  shell: sh

Everything works as expected.

Thanks!

Originally created by @kai-tub on GitHub (Apr 28, 2020). Original GitHub issue: https://github.com/nektos/act/issues/214 Hi, first of all thanks for providing such an awesome library! I am using a container to run all steps of a job, which doesn't offer a bash environment: My workflow file looks something like this: ``` on: push: branches: [ master ] jobs: test: name: Test and build latex documents runs-on: ubuntu-latest # runs all of the steps inside the specified container rather than on the VM host. # Bonus: The latest alpine image, which texlive is based on also integrates python3 container: image: xucheng/texlive-small:latest # Reconfigure all following shells to use sh and not bash defaults: run: shell: sh steps: - name: Set up Git uses: actions/checkout@v2 - name: Echo run: echo Hello ``` Which will fail with the following error message: `starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown` It works on GitHub. The problem seems to be caused by act not saving using the default values. If I set the shell on a per run basis like: ``` - name: Echo run: echo Hello shell: sh ``` Everything works as expected. Thanks!
kerem 2026-03-01 21:40:38 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 13, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:657298314 --> @github-actions[bot] commented on GitHub (Jul 13, 2020): Issue is stale and will be closed in 7 days unless there is new activity
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#145
No description provided.