question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GITHUB_ENV: No such file or directory

See original GitHub issue

Describe 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. image

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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
nikola-jokiccommented, Mar 8, 2022

Hi 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found