[GH-ISSUE #2424] Act attemps to run bash script on Windows #1116

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

Originally created by @WilliamKarolDiCioccio on GitHub (Aug 17, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2424

Bug report info

act version:            0.2.65
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
        C:\Users\***\AppData\Local\act\actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.21.12
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.65 -X main.commit=bda491e406db6c85865498ced18764bc00491a5e -X main.date=2024-08-01T02:22:32Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         bda491e406db6c85865498ced18764bc00491a5e
                vcs.time:             2024-08-01T02:22:10Z
                vcs.modified:         false
Docker Engine:
        Engine version:        27.1.1
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.153.1-microsoft-standard-WSL2
        OS CPU:                16
        OS memory:             15542 MB
        Security options:
                name=seccomp,profile=unconfined

Command used with act

act -j run-app-windows -P windows-latest=-self-hosted

Describe issue

When running a GitHub Actions workflow locally on a self-hosted Windows runner, the job fails when trying to execute a bash script. The error occurs during the "Main Make setup script executable" step, where Act attempts to run a bash script (1-composite-0.sh) failing with the error: /bin/bash: C:/Users/***/.cache/act/efeceb5f729089c8/act/workflow/1-composite-0.sh: No such file or directory.

https://github.com/WilliamKarolDiCioccio/open_local_ui

Workflow content

name: Flutter Test

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  run-app-windows:
    runs-on: windows-latest
    steps:
      - name: Clone repository
        uses: actions/checkout@v2

      - name: Setup Flutter
        uses: subosito/flutter-action@v2.16.0
        with:
          channel: stable
          cache: true

      - name: Install Dependencies
        run: |
          winget install -e --id Gyan.FFmpeg

      - name: Copy .env.dev to .env
        run: |
          cd .\\app
          copy .env.dev .env

      - name: Get dependencies
        run: |
          cd .\app
          flutter pub get

      - name: Generate files
        run: |
          cd .\\app
          dart run build_runner build --delete-conflicting-outputs

      - name: Run App
        run: |
          cd .\\app
          flutter build windows

Relevant log output

[Flutter Test/run-app-windows]   ☁  git clone 'https://github.com/subosito/flutter-action' # ref=v2.16.0
[Flutter Test/run-app-windows] ⭐ Run Pre Setup Flutter
[Flutter Test/run-app-windows]   ☁  git clone 'https://github.com/actions/cache' # ref=v4
[Flutter Test/run-app-windows]   ☁  git clone 'https://github.com/actions/cache' # ref=v4
[Flutter Test/run-app-windows]   ✅  Success - Pre Setup Flutter
[Flutter Test/run-app-windows] ⭐ Run Main Clone repository
[Flutter Test/run-app-windows]   ✅  Success - Main Clone repository
[Flutter Test/run-app-windows] ⭐ Run Main Setup Flutter
[Flutter Test/run-app-windows] ⭐ Run Main Make setup script executable
| /bin/bash: C:/Users/***/.cache/act/efeceb5f729089c8/act/workflow/1-composite-0.sh: No such file or directory
                                                                                                                      [Flutter Test/run-app-windows]   ❌  Failure - Main Make setup script executable
[Flutter Test/run-app-windows] exit status 1
[Flutter Test/run-app-windows]   ⚙  ::set-output:: VERSION=
[Flutter Test/run-app-windows]   ⚙  ::set-output:: ARCHITECTURE=
[Flutter Test/run-app-windows]   ⚙  ::set-output:: CACHE-KEY=
[Flutter Test/run-app-windows]   ⚙  ::set-output:: CACHE-PATH=
[Flutter Test/run-app-windows]   ⚙  ::set-output:: PUB-CACHE-KEY=
[Flutter Test/run-app-windows]   ⚙  ::set-output:: PUB-CACHE-PATH=
[Flutter Test/run-app-windows]   ⚙  ::set-output:: CHANNEL=
[Flutter Test/run-app-windows]   ❌  Failure - Main Setup Flutter
[Flutter Test/run-app-windows] exit status 1
[Flutter Test/run-app-windows] ⭐ Run Post Setup Flutter
[Flutter Test/run-app-windows]   ✅  Success - Post Setup Flutter
[Flutter Test/run-app-windows] 🏁  Job failed
Error: Job 'run-app-windows' failed

Additional information

No response

Originally created by @WilliamKarolDiCioccio on GitHub (Aug 17, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2424 ### Bug report info ```plain text act version: 0.2.65 GOOS: windows GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: \\.\pipe\docker_engine(broken) Config files: C:\Users\***\AppData\Local\act\actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.21.12 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.65 -X main.commit=bda491e406db6c85865498ced18764bc00491a5e -X main.date=2024-08-01T02:22:32Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: bda491e406db6c85865498ced18764bc00491a5e vcs.time: 2024-08-01T02:22:10Z vcs.modified: false Docker Engine: Engine version: 27.1.1 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.15.153.1-microsoft-standard-WSL2 OS CPU: 16 OS memory: 15542 MB Security options: name=seccomp,profile=unconfined ``` ### Command used with act ```sh act -j run-app-windows -P windows-latest=-self-hosted ``` ### Describe issue When running a GitHub Actions workflow locally on a self-hosted Windows runner, the job fails when trying to execute a bash script. The error occurs during the "Main Make setup script executable" step, where Act attempts to run a bash script (1-composite-0.sh) failing with the error: /bin/bash: C:/Users/***/.cache/act/efeceb5f729089c8/act/workflow/1-composite-0.sh: No such file or directory. ### Link to GitHub repository https://github.com/WilliamKarolDiCioccio/open_local_ui ### Workflow content ```yml name: Flutter Test on: push: branches: - main pull_request: branches: - main jobs: run-app-windows: runs-on: windows-latest steps: - name: Clone repository uses: actions/checkout@v2 - name: Setup Flutter uses: subosito/flutter-action@v2.16.0 with: channel: stable cache: true - name: Install Dependencies run: | winget install -e --id Gyan.FFmpeg - name: Copy .env.dev to .env run: | cd .\\app copy .env.dev .env - name: Get dependencies run: | cd .\app flutter pub get - name: Generate files run: | cd .\\app dart run build_runner build --delete-conflicting-outputs - name: Run App run: | cd .\\app flutter build windows ``` ### Relevant log output ```sh [Flutter Test/run-app-windows] ☁ git clone 'https://github.com/subosito/flutter-action' # ref=v2.16.0 [Flutter Test/run-app-windows] ⭐ Run Pre Setup Flutter [Flutter Test/run-app-windows] ☁ git clone 'https://github.com/actions/cache' # ref=v4 [Flutter Test/run-app-windows] ☁ git clone 'https://github.com/actions/cache' # ref=v4 [Flutter Test/run-app-windows] ✅ Success - Pre Setup Flutter [Flutter Test/run-app-windows] ⭐ Run Main Clone repository [Flutter Test/run-app-windows] ✅ Success - Main Clone repository [Flutter Test/run-app-windows] ⭐ Run Main Setup Flutter [Flutter Test/run-app-windows] ⭐ Run Main Make setup script executable | /bin/bash: C:/Users/***/.cache/act/efeceb5f729089c8/act/workflow/1-composite-0.sh: No such file or directory [Flutter Test/run-app-windows] ❌ Failure - Main Make setup script executable [Flutter Test/run-app-windows] exit status 1 [Flutter Test/run-app-windows] ⚙ ::set-output:: VERSION= [Flutter Test/run-app-windows] ⚙ ::set-output:: ARCHITECTURE= [Flutter Test/run-app-windows] ⚙ ::set-output:: CACHE-KEY= [Flutter Test/run-app-windows] ⚙ ::set-output:: CACHE-PATH= [Flutter Test/run-app-windows] ⚙ ::set-output:: PUB-CACHE-KEY= [Flutter Test/run-app-windows] ⚙ ::set-output:: PUB-CACHE-PATH= [Flutter Test/run-app-windows] ⚙ ::set-output:: CHANNEL= [Flutter Test/run-app-windows] ❌ Failure - Main Setup Flutter [Flutter Test/run-app-windows] exit status 1 [Flutter Test/run-app-windows] ⭐ Run Post Setup Flutter [Flutter Test/run-app-windows] ✅ Success - Post Setup Flutter [Flutter Test/run-app-windows] 🏁 Job failed Error: Job 'run-app-windows' failed ``` ### Additional information _No response_
kerem 2026-03-01 21:49:01 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ChristopherHX commented on GitHub (Aug 17, 2024):

Please tell them that you don't agree about their usage of bash github.com/subosito/flutter-action@44ac965b96/action.yaml (L78)

Either don't use the flutter-action or modify PATH to prefer mingw, git or cygwin bash.
Keep in mind that a windows bash.exe must be before system32 in your path before running act

<!-- gh-comment-id:2294898521 --> @ChristopherHX commented on GitHub (Aug 17, 2024): Please tell them that you don't agree about their usage of bash https://github.com/subosito/flutter-action/blob/44ac965b96f18d999802d4b807e3256d5a3f9fa1/action.yaml#L78 Either don't use the flutter-action or modify `PATH` to prefer mingw, git or cygwin bash. Keep in mind that a windows bash.exe must be before system32 in your path before running act
Author
Owner

@WilliamKarolDiCioccio commented on GitHub (Aug 17, 2024):

Thanks @ChristopherHX. I'll opt for your proposed solution for now. Maybe I'll open an issue on their repo or fork it. It think we can close this then 👍

<!-- gh-comment-id:2294941430 --> @WilliamKarolDiCioccio commented on GitHub (Aug 17, 2024): Thanks @ChristopherHX. I'll opt for your proposed solution for now. Maybe I'll open an issue on their repo or fork it. It think we can close this then 👍
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#1116
No description provided.