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

Windows - addPath, exportVariable, Path listing in log, etc #576

Closed
MSP-Greg opened this issue Jul 5, 2020 · 4 comments
Closed

Windows - addPath, exportVariable, Path listing in log, etc #576

MSP-Greg opened this issue Jul 5, 2020 · 4 comments
Assignees
Labels
awaiting-customer-response bug Something isn't working

Comments

@MSP-Greg
Copy link

MSP-Greg commented Jul 5, 2020

Describe the bug

Generally, this involves path manipulation via @actions/core or possibly echo script statements.

There are three items affected by the following:

  1. Does the runner correctly select the first bash.exe in Path for the bash shell on Windows?
  2. Do scripts in steps have the correct Path?
  3. Is the Path string reported in the log correct?

In ruby/setup-ruby, we'd prefer to remove the existing Path entries for the default toolcache Ruby installation. We're also adding path entries for MSYS2, which changes the bash shell from Git to MSYS2, and the path entries needed to enable the selected Ruby build.

So, because we're removing items, we're using core.exportVariable('Path', cleanPath). We tried also placing the path
additions in the cleanPath string. With this method, 1 failed, and 2 & 3 were correct.
An example of this is shown in:
https://github.com/MSP-Greg/ruby-setup-ruby/runs/839254015, note the ' bash test_ruby.rb' step's log (the bash shell choosen and the Path string).

So, with that not working, we then used one call to core.exportVariable('Path', cleanPath) with only items removed in cleanPath. Then, we used core.addPath(newPathEntries) for the additions. With this method, 1 & 2 were correct, but 3 failed. As example of this is:
https://github.com/MSP-Greg/ruby-setup-ruby/runs/839265335

Since I've only tested this via js code in a custom action, it's difficult to show examples of the issue. I can see if I can repo it using echo statements if that would be helpful.

@MSP-Greg MSP-Greg added the bug Something isn't working label Jul 5, 2020
@MSP-Greg
Copy link
Author

MSP-Greg commented Jul 11, 2020

One option might be to add a removeTool function that would allow removing pre-installed tools from PATH?

@nikola-jokic
Copy link
Contributor

Hi @MSP-Greg,

Are you still seeing this issue? It has been a long time since it was reported, sorry for that, and I can see that the PR has been merged. Can you please tell me if you are still seeing this issue?

@MSP-Greg
Copy link
Author

@nikola-jokic

I apologize for leaving this open. There have been a lot of changes in the two years since this was opened.

We aren't having any issues with Ruby workflows.

@nikola-jokic
Copy link
Contributor

Thank you notifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-customer-response bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants