Open xpufx opened 2 years ago
I was able to diagnose this further and get some env info to print by changing shell=bash to shell=/usr/bin/bash {0} and avoid path.
Before the tollchain step PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin After; it becomes PATH=/github/home/.cargo/bin
Intuitevely I know this is not necessarily an issue with this repo since it only happens on opensuse, but can you point me to where I should look? Is it a difference of how the different bash installs behave? A missing profile/rc file - though action runners should not read those I think. Anything?
This is where this action manipulates the path: https://github.com/actions-rs/core/blob/master/src/commands/rustup.ts#L89-L90
that appears to call through to a core module whose docs are over here:
https://github.com/actions/toolkit/blob/main/docs/commands.md#environment-files
That talks about manipulting a file named by the $GITHUB_PATH
env var.
is the implementation of addPath
which looks like it does an azure pipelines add-path command in the case that $GITHUB_PATH
isn't set in the environment.
I think this issue might be better off moved to the https://github.com/actions/toolkit repo!
Description
I am trying to add opensuse packaging workflows to a project that already has workflows for a bunch of deb and rpm based distros. At a particular step a shell script needs to be run but it causes an error message as if 'bash' is not installed - but prior steps use the same shell without a problem. Upon further debugging I realized it doesn't matter what the 'run' command/script is. Even if I put something very simple like echo or /usr/bin/env there, I get the same error. The error message in its most basic form is,
It says the bash executable is not found but I believe error 126 is a permission error.
Now the reason I am posting this here is because I can use the shell in every step of the workflow before the toolchain step and it works fine. As soon as I run the toolchain step to install cargo/rust and then try to "run" any commands I get a similar error. (Though it doesn't seem to keep an @actions/cache@v3 step from running.)
The issue seems specific to opensuse (leap and tumbleweed). Is there any way I can debug this further?
Workflow code
Action output
I didn't enable debugging because the toolchain step is not really failing. Below toolchain errors exist verbatim (except container id) on the centos/fedora jobs too. So I doubt the log is very useful.
Expected behavior
Expected current value of PATH to be displayed.