Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shellcommand error on alpine sh shell #1464

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

chunleng
Copy link
Contributor

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

@chunleng chunleng requested a review from a team as a code owner November 25, 2022 08:51
@chunleng chunleng changed the title Fix shellcommand error on sh shell Fix shellcommand error on alpine sh shell Nov 25, 2022
@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #1464 (59ac588) into master (4f8da0a) will increase coverage by 2.92%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #1464      +/-   ##
==========================================
+ Coverage   57.50%   60.43%   +2.92%     
==========================================
  Files          32       44      +12     
  Lines        4594     6999    +2405     
==========================================
+ Hits         2642     4230    +1588     
- Misses       1729     2463     +734     
- Partials      223      306      +83     
Impacted Files Coverage Δ
pkg/common/file.go 0.00% <0.00%> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/host_environment.go 0.00% <0.00%> (ø)
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/model/action.go 0.00% <0.00%> (ø)
pkg/model/step_result.go 0.00% <ø> (ø)
pkg/container/docker_run.go 12.82% <11.53%> (+7.27%) ⬆️
pkg/model/workflow.go 45.65% <23.58%> (-5.26%) ⬇️
...ontainer/linux_container_environment_extensions.go 24.32% <24.32%> (ø)
pkg/container/docker_pull.go 33.33% <33.33%> (ø)
... and 37 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mergify mergify bot merged commit 8732728 into nektos:master Nov 25, 2022
@chunleng chunleng deleted the fix-sh-launch-error branch November 25, 2022 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants