I'm trying to install https://scoop.sh/, but I fail to add it to the PATH environment variable for subsequent steps. I tried:
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
(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?
Solved! Solved! Go to Solution.
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.