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

Error on Windows Self-hosted runner #211

Closed
olivier-jourdan opened this issue Jan 18, 2022 · 7 comments
Closed

Error on Windows Self-hosted runner #211

olivier-jourdan opened this issue Jan 18, 2022 · 7 comments

Comments

@olivier-jourdan
Copy link

I get this error when I try to run the action on my self hosted runner (Windows Server 2019 Datacenter (1809))

image

It seems that a path is not formatted correctly, and I haven't any clue how to fix that.

Any idea?

@EnricoMi
Copy link
Owner

Is your repo public? Can you paste the workflow YAML here?

To me this looks like a general issue with your self-hosted runner as it does not seem to be able to execute any bash shell code. The runner puts the shell code into a temporary file any tells C:\Windows\system32\bash.EXE to execute it, but it does not properly escape the \ in the path of the temporary file.

Does the following action work on your self-hosted runner:

   - run: ls
     shell: bash

@EnricoMi
Copy link
Owner

Looks like your error: actions/runner#1328

@olivier-jourdan
Copy link
Author

Thank you for your quick reply @EnricoMi

The repo is not public, unfortunately.

Before getting this error, I had clear errors saying my runner couldn't execute bash shell code. I guessed I fixed that. Not completely, apparently…
I'll test the action you said and keep you posted.

@olivier-jourdan
Copy link
Author

Same error…

Run ls
  ls
  shell: C:\Windows\system32\bash.EXE --noprofile --norc -e -o pipefail {0}
/bin/bash: C:actions-runner_work_temp9928f894-24aa-42cc-b75c-7cc78ff93ccc.sh: No such file or directory

Bash is installed on my runner. I can execute it from powershell.

I'm missing something, but it's clearly not a bug on your side.
Thanks for your help. I'll try to figure out what's wrong and keep you posted for the record.

@EnricoMi
Copy link
Owner

Let me close this issue then but please report back when you know what the problem and fix is.

@EnricoMi
Copy link
Owner

I have recently used a self-hosted Windows runner myself. I have installed Git BASH, added the location of bash.exe to PATH and used that shell with my action. This handled the backslashes in the path just fine.

What bash did you use? How did you install C:\Windows\system32\bash.EXE?

@EnricoMi
Copy link
Owner

@olivier-jourdan do you remember how you installed C:\Windows\system32\bash.EXE on your self-hosted WIndows runner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants