Skip to content

Deprecated add-path #25481

Answered by thboop
w3sip asked this question in Actions
Discussion options

You must be logged in to vote
thboop:
run: |
  echo "c:\git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
  echo "c:\git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8

Hey @w3sip, I apologize I forgot to add the -Append flag, if you add that it should work.

Take a look at the following workflow

name: CI
on:
  push
jobs:
  test:
    runs-on: windows-latest 
    steps:
     - run: |
         echo "c:\git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
         echo "c:\git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
     - run: $env:PATH

You can see it gets added to the path.

I’ll get our docs updated so others don’t run into t…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants