[GH-ISSUE #884] Issue: Unable to run pwsh steps #528

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

Originally created by @Ilia-Kosenkov on GitHub (Nov 15, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/884

Originally assigned to: @catthehacker on GitHub.

System information

  • Operating System: Windows 10
  • Architecture: x64 (64-bit)
  • Docker version: 20.10.18
  • Docker image used in act: ghcr.io/catthehacker/ubuntu:pwsh-20.04
  • act version: act version 0.2.24

Expected behaviour

Running this workflow

act -v -j tests_no_bindgen -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:pwsh-20.04

The workflow finishes suceesfully.

Actual behaviour

[Tests/ubuntu-20.04 (R-release rust-stable)-3       ]   🐳  docker exec cmd=[pwsh -command . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5'] user=
[Tests/ubuntu-20.04 (R-release rust-stable)-3       ] Exec command '[pwsh -command . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5']'
| ResourceUnavailable: Program '5' failed to run: Exec format errorAt line:1 char:1
| + . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5'
| + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
time="2021-11-15T19:02:58+03:00" level=debug msg="exit with `FAILURE`: 1"
[Tests/ubuntu-20.04 (R-release rust-stable)-3       ]   ❌  Failure - Configure Linux

Workflow and/or repository

Possible explanation

According to the docs, when executing PowerShell scripts, GHA appends .ps1 to the file name.
If I connect to the container and modify the name of the faulty workflow (in this case, 5), I can execute pwsh -command . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5' with no problem (I mean, this particular problem goes away).

Steps to reproduce

git clone https://github.com/extendr/extendr
cd extendr
act -v -j tests_no_bindgen -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:pwsh-20.04
Log

Originally created by @Ilia-Kosenkov on GitHub (Nov 15, 2021). Original GitHub issue: https://github.com/nektos/act/issues/884 Originally assigned to: @catthehacker on GitHub. <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information - Operating System: Windows 10 - Architecture: x64 (64-bit) - Docker version: `20.10.18` - Docker image used in `act`: `ghcr.io/catthehacker/ubuntu:pwsh-20.04` - `act` version: act version `0.2.24` ## Expected behaviour Running [this](https://github.com/extendr/extendr/blob/master/.github/workflows/test.yml) workflow ```pwsh act -v -j tests_no_bindgen -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:pwsh-20.04 ``` The workflow finishes suceesfully. ## Actual behaviour ``` [Tests/ubuntu-20.04 (R-release rust-stable)-3 ] 🐳 docker exec cmd=[pwsh -command . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5'] user= [Tests/ubuntu-20.04 (R-release rust-stable)-3 ] Exec command '[pwsh -command . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5']' | ResourceUnavailable: Program '5' failed to run: Exec format errorAt line:1 char:1 | + . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5' | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~. time="2021-11-15T19:02:58+03:00" level=debug msg="exit with `FAILURE`: 1" [Tests/ubuntu-20.04 (R-release rust-stable)-3 ] ❌ Failure - Configure Linux ``` ## Workflow and/or repository - [extendr/extendr](https://github.com/extendr/extendr) - [test.yml](https://github.com/extendr/extendr/blob/master/.github/workflows/test.yml) ## Possible explanation According to the [docs](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsshell), when executing PowerShell scripts, GHA appends `.ps1` to the file name. If I connect to the container and modify the name of the faulty workflow (in this case, `5`), I can execute `pwsh -command . '/mnt/d/OneDrive/Development/OSS/extendr/workflow/5'` with no problem (I mean, this particular problem goes away). ## Steps to reproduce ```pwsh git clone https://github.com/extendr/extendr cd extendr act -v -j tests_no_bindgen -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:pwsh-20.04 ``` <details> <summary>Log</summary> ```none ``` </details>
kerem 2026-03-01 21:44:11 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 16, 2021):

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

<!-- gh-comment-id:995313222 --> @github-actions[bot] commented on GitHub (Dec 16, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@stlkcmrd commented on GitHub (Mar 31, 2022):

Ironic enough, I faced the very same issue with running Github actions for the very same repository.

<!-- gh-comment-id:1084259981 --> @stlkcmrd commented on GitHub (Mar 31, 2022): Ironic enough, I faced the very same issue with running Github actions for the very same repository.
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#528
No description provided.