-
I’m trying to install https://scoop.sh/, but I fail to add it to the PATH environment variable for subsequent steps. I tried:
and
(with a modified $env:Path). When I print the PATH variable in the next step, it always remains unchanged. What’s the correct way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 2 replies
-
Each step is run its own process space so environment changes do not automatically propgate. If you want to update the path you can use the |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, this worked without problems! I saw this page before but somehow thought that it only applied to the Node.js toolkit. |
Beta Was this translation helpful? Give feedback.
-
The cited documentation suggests the modification is seen by all subsequent steps in the job. So it would seem at odds with your assertion that each step is its own process. I’ve not been able to get |
Beta Was this translation helpful? Give feedback.
-
It seems like the correct way on Windows is (contrary to the doc):
|
Beta Was this translation helpful? Give feedback.
-
Ultimately had to monkey at the typescript level https://github.com/dickmao/setup-paths to change PATH. |
Beta Was this translation helpful? Give feedback.
-
Hi, Is there any documentation about this windows add-path style? From the offical docs, I couldn’t find it. |
Beta Was this translation helpful? Give feedback.
-
Hi, Is there any documentation about this windows add-path style? From the offical docs, I couldn’t find it. |
Beta Was this translation helpful? Give feedback.
-
> Each step is run its own process space so environment changes do not automatically propgate. If you want to update the path you can use the Your link as countless others out there for the GitHub actions documentation are all dead. |
Beta Was this translation helpful? Give feedback.
-
A little bit of googling and here it is: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path Works, at least at the moment of writing this. |
Beta Was this translation helpful? Give feedback.
Each step is run its own process space so environment changes do not automatically propgate. If you want to update the path you can use the
add-path
command as documented https://help.github.com/en/articles/development-tools-for-github-actions#add-a-system-path-add-path.