Skip to content
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

addPath always prepend to path #270

Open
jetersen opened this issue Dec 21, 2019 · 3 comments
Open

addPath always prepend to path #270

jetersen opened this issue Dec 21, 2019 · 3 comments
Labels
core enhancement New feature or request

Comments

@jetersen
Copy link

jetersen commented Dec 21, 2019

Describe the enhancement
core.addPath
assumes you always wants to prepend, however in some cases, you want to append to path.

Appending is most likely the case for dotnet global tools.

Either add another method or have a boolean/option to choose whether you want to append/prepend

Additional information
actions/setup-dotnet#69 (comment)

@jetersen jetersen added the enhancement New feature or request label Dec 21, 2019
@joshmgross
Copy link
Member

Why do dotnet global tools need to append instead of prepend?

@jetersen
Copy link
Author

there might be executable that could accidentally override the order of things.

@jimhester
Copy link
Contributor

One example where appending is necessary is for the setup-r action. On macOS the action needs to install a gfortran .pkg, and this should really be appended to the PATH, because the gfortran pkg contains a gcov executable, but we want to continue to use the normal gcov executable shipped with llvm for most code.

As a workaround I put a call to core.addPath("/usr/bin") after the call adding the gfortran PATH, but that then breaks other actions (such as setup-python) which put tools before "/usr/bin".

Support for appending path in the actions toolkit would give a solution to this problem. we would just call core.addPath("path/to/gfortran", append = true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants