-
Notifications
You must be signed in to change notification settings - Fork 990
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
Self-Hosted Runner using Window's find.exe instead of unix-style find.exe in git bin #786
Comments
@dskvr can you try the following?
|
Edit: Updated results from correct platform. Explicitly Set (because other workflows are defaults:
run:
shell: bash The following - shell: cmd
run: ECHO %PATH%
- run: |
echo "Path: $PATH"
echo "Where: $(where find)"
echo "Which: $(which find)" Produced # bash shell in runnner
Run ECHO %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git LFS;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Amazon\AWSCLI\bin\;C:\Program Files\7-Zip;C:\Users\***\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\***\AppData\Local\Programs\Python\Python38-32\;C:\Users\***\AppData\Local\Microsoft\WindowsApps;C:\Users\***\AppData\Local\GitHubDesktop\bin
0s
Run echo "Path: $PATH"
Path: /c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/Git LFS:/cmd:/mingw64/bin:/usr/bin:/c/ProgramData/chocolatey/bin:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/Microsoft Windows Performance Toolkit:/c/Program Files/Amazon/AWSCLI/bin:/c/Program Files/7-Zip:/c/Users/***/AppData/Local/Programs/Python/Python38-32/Scripts:/c/Users/***/AppData/Local/Programs/Python/Python38-32:/c/Users/***/AppData/Local/Microsoft/WindowsApps:/c/Users/***/AppData/Local/GitHubDesktop/bin
Where: C:\Windows\System32\find.exe
C:\Program Files\Git\usr\bin\find.exe
Which: /c/Windows/system32/find |
@dskvr what if you open the git-bash and print out $PATH? I assume it modifies the environment. |
Reminder: # git bash terminal on runner
$ echo "Path: $PATH"
Path: /c/Users/***/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/***/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/Git LFS:/cmd:/mingw64/bin:/usr/bin:/c/ProgramData/chocolatey/bin:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/Microsoft Windows Performance Toolkit:/c/Program Files/Amazon/AWSCLI/bin:/c/Program Files/7-Zip:/c/Users/***/AppData/Local/Programs/Python/Python38-32/Scripts:/c/Users/***/AppData/Local/Programs/Python/Python38-32:/c/Users/***/AppData/Local/Microsoft/WindowsApps:/c/Users/***/AppData/Local/GitHubDesktop/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
$ echo "Where: $(where find)"
Where: C:\Program Files\Git\usr\bin\find.exe
C:\Windows\System32\find.exe
$ echo "Which: $(which find)"
Which: /usr/bin/find So it appears that the path is flipped around. Potentially similar to
No worries |
@TingluoHuang Has there been any developments on this? Curious if it's replicable. I spun up a new runner and the same thing is happening. I'm calling the full path directly as a workaround (windows only), but it makes a mess of things in the multi-platform matrix. |
I might have had a similar issue with act. Act on windows picks up wsl bash instead of git bash. I wrote to GITHUB_PATH and stuff worked for me. - name: Set path for nektos/act
if: ${{ runner.os == 'Windows' && env.ACT }}
run: echo "C:\Program Files\Git\bin" >> $GITHUB_PATH
shell: '"C:\Program Files\Git\bin\bash.exe" -c {0}' |
Describe the bug
Receive the following error when trying to use find
When opening Git Bash and running the same code, it executes as expected.
bash
and the step where this code is executed does not override that.To Reproduce
find . -type f -name *.tar.gz
Expected behavior
For the unix style script to work.
Runner Version and Platform
Runner Version:
2.273.6
OS: Windows 10 (current)
What's not working?
find
I tried to look into how a runner sets up its environment variables but there was no documentation on the subject.
The text was updated successfully, but these errors were encountered: