Broken %PATH% for the regular cmd environment
After running the installation all the %PATH% values are gone on the regular cmd shell.
- name: Debug PATH before Swift installation
shell: pwsh
run: |
Write-Host "PATH before Swift installation:"
Write-Host $env:PATH
- name: Debug PATH in cmd shell
shell: cmd
run: |
echo %PATH%
- name: Install Swift toolchain
uses: compnerd/gha-setup-swift@main
with:
branch: swift-${{ env.SWIFT_VERSOIN }}-release
tag: ${{ env.SWIFT_VERSOIN }}-RELEASE
- name: Debug PATH after Swift installation
shell: pwsh
run: |
Write-Host "PATH after Swift installation:"
Write-Host $env:PATH
- name: Debug PATH in cmd shell
shell: cmd
run: |
echo %PATH%
The pwsh works as expected, but the cmd %PATH% is empty after running the swift installation.
Interesting. Would you be able to run a quick test of set and path instead of echo %Path%?
Sure - after the installation:
echo %PATH% //shows empty
set PATH //shows correct paths
path //shows empty path=
before running this action - all works fine.
My problem is that without "path" none of the commands are executable and cannot be found in regular cmd - which breaks our build process completely after using this action.
set PATH working properly indicates that the environment is properly configured. echo %PATH% not matching is really odd.