GITHUB_ENV: No such file or directory
See original GitHub issueDescribe the bug I am trying to set environment variable using $GITHUB_ENV, and it results in “no such file” error.
To Reproduce
- name: Set env to prod
if: github.base_ref == 'master' || github.ref == 'refs/heads/master'
run: echo "ENV_NAME=prod" >> $GITHUB_ENV
Expected behavior It should set environment variable.
Runner Version and Platform
Version of your runner? Current runner version: ‘2.283.3’ OS of the machine running the runner? OSX/Windows/Linux/… Linux
What’s not working?
Please include error messages and screenshots.
Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Runner and Worker’s Diagnostic Logs
[2021-10-28 14:51:22Z INFO ScriptHandler] Which: 'bash'
[2021-10-28 14:51:22Z INFO ScriptHandler] Location: '/usr/bin/bash'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Starting process:
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] File name: '/usr/bin/bash'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Arguments: '-e /home/ubuntu/actions-runner/_work/_temp/8832112a-0fc7-446f-a56d-a23f73497356.sh'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Working directory: '/home/ubuntu/actions-runner/_work/myproject/myproject/terraform'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Require exit code zero: 'False'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Encoding web name: ; code page: ''
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Force kill process on cancellation: 'False'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Redirected STDIN: 'False'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Persist current code page: 'False'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] Keep redirected STDIN open: 'False'
[2021-10-28 14:51:22Z INFO ProcessInvokerWrapper] High priority process: 'False'
[2021-10-28 14:51:22Z ERR StepsRunner] Caught exception from step: System.ComponentModel.Win32Exception (2): No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, U
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
No such file or directory passing env variable to working- ...
The following worked: - name: WORKING DIRECTORY env: base_directory: ./base run: | echo "HELLO" working-directory: ${{ env.base_directory ...
Read more >Getting error "/usr/bin/env: 'bash': No such file or directory" ...
Committing from command line, and from Git Extensions works, so it looks like the problem is about Github Desktop specifically. Version & OS....
Read more >GitHub action fails with No such file or directory
I am trying a very basic GitHub CI actions with my PlatformIO project. I am using almost the official Workflow provided by the...
Read more >usr/bin/locale: No such file or directory" in Cmder on startup
My env.exe actually tries to execute /usr/bin/locale , and as /usr/bin/locale does not exist, it raises the error. The issue is really about ......
Read more >'/home/appuser/venv/bin/streamlit': No such file or directory
Hello, I am facing this error and no idea how to solve it or what it means. This is the github: https://github.com/Nabil-Miri/mystreamlit.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@niqo01 , I think the issue might be related to
working-directory
specified indefaults.run
I was able to reproduce the issue that you are facing https://github.com/SaileshBellamkonda/test-actions-runner/runs/4815449951?check_suite_focus=true and https://github.com/SaileshBellamkonda/test-actions-runner/runs/4815496415?check_suite_focus=true
it got resolved after making sure the
working-directory
exists https://github.com/SaileshBellamkonda/test-actions-runner/runs/4815527862?check_suite_focus=true and https://github.com/SaileshBellamkonda/test-actions-runner/runs/4815642613?check_suite_focus=trueHi everyone,
I tried to reproduce this issue and @SaileshBellamkonda is right. This issue does not relate to the GITHUB_ENV environment variable, but the
workdir
that does not exist. While reproducing, I am getting an error message saying:Error: An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/step-order/step-order/test'. No such file or directory
.I will close this issue now since it does not relate to the
GITHUB_ENV
variable itself. Please, make sure that your directories are set correctly. If you feel like it is not related to the directory that does not exist, feel free to re-open it and please, provide an example repository or a workflow file so we can investigate further.