[PR #1464] [MERGED] Fix shellcommand error on alpine sh shell #1958

Closed
opened 2026-03-01 21:53:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1464
Author: @chunleng
Created: 11/25/2022
Status: Merged
Merged: 11/25/2022
Merged by: @mergify[bot]

Base: masterHead: fix-sh-launch-error


📝 Commits (1)

  • 59ac588 Fix shellcommand error on sh shell

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 pkg/model/workflow.go (+1 -1)

📄 Description

When running on sh on alpine image, the following error occurs:

[test.yml/test] 🚀  Start image=docker:20.10
[test.yml/test]   🐳  docker pull image=docker:20.10 platform=linux/amd64 username= forcePull=false
[test.yml/test]   🐳  docker create image=docker:20.10 platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test.yml/test]   🐳  docker run image=docker:20.10 platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test.yml/test] ⭐ Run Main ls
[test.yml/test]   🐳  docker exec cmd=[sh -e -c /var/run/act/workflow/0.sh] user= workdir=..
| 0.sh: applet not found
[test.yml/test]   ❌  Failure - Main ls
[test.yml/test] exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information
[test.yml/test] 🏁  Job failed
Error: Job 'test' failed

It seems to be working without any problem on debian. I suspect that it's due to the difference in interpreting a fille passed onto -c option by both the OS.

Since we are passing in a .sh file in this case, I think it's safe to drop that option


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1464 **Author:** [@chunleng](https://github.com/chunleng) **Created:** 11/25/2022 **Status:** ✅ Merged **Merged:** 11/25/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `fix-sh-launch-error` --- ### 📝 Commits (1) - [`59ac588`](https://github.com/nektos/act/commit/59ac588f85856e50331603085db720681079939a) Fix shellcommand error on sh shell ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/model/workflow.go` (+1 -1) </details> ### 📄 Description When running on sh on alpine image, the following error occurs: ```text [test.yml/test] 🚀 Start image=docker:20.10 [test.yml/test] 🐳 docker pull image=docker:20.10 platform=linux/amd64 username= forcePull=false [test.yml/test] 🐳 docker create image=docker:20.10 platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test.yml/test] 🐳 docker run image=docker:20.10 platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test.yml/test] ⭐ Run Main ls [test.yml/test] 🐳 docker exec cmd=[sh -e -c /var/run/act/workflow/0.sh] user= workdir=.. | 0.sh: applet not found [test.yml/test] ❌ Failure - Main ls [test.yml/test] exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information [test.yml/test] 🏁 Job failed Error: Job 'test' failed ``` It seems to be working without any problem on debian. I suspect that it's due to the difference in interpreting a fille passed onto `-c` option by both the OS. Since we are passing in a `.sh` file in this case, I think it's safe to drop that option --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:25 +03:00
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#1958
No description provided.