python from msys64 directory gets invoked on windows

Open
#791 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, javascript, python

Research direction

Start with windows.js at line 75 and inspect how setup-ruby changes PATH after setup-python has run. Reproduce the workflow using the PATH shown in the issue, then determine how a configurable ordering should behave; done means Python resolves to the configured Python installation rather than Ruby's msys64 Python.

Written by the indexing model from the issue text.

Description

My workflow has setup-python step followed by setup-ruby. Noticed that the python from msys64 directory is getting invoked, due to it appearing before the Python directory in the PATH.

C:/hostedtoolcache/windows/Ruby/3.4.5/x64/msys64/ucrt64/bin/python.exe: No module named pip

I think this line is responsible for this feature/bug.

https://github.com/ruby/setup-ruby/blob/30011b6444339b8df773cfc724e1631d805a5e64/windows.js#L75

PATH variable in GitHub actions.

/c/hostedtoolcache/windows/cs/2.1.17/x64:/c/Users/runneradmin/cs/bin:/c/hostedtoolcache/windows/sbt/1.11.2/sbt/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/21.0.8-9.0/x64/bin:/c/hostedtoolcache/windows/Ruby/3.4.5/x64/bin:/c/hostedtoolcache/windows/Ruby/3.4.5/x64/msys64/ucrt64/bin:/c/hostedtoolcache/windows/Ruby/3.4.5/x64/msys64/usr/bin:/c/Users/runneradmin/AppData/Roaming/Python/Python312/Scripts:/c/hostedtoolcache/windows/Python/3.12.10/x64/Scripts:/c/hostedtoolcache/windows/Python/3.12.10/x64:

Would it be possible to make this configurable?

Dominant language
JavaScript
Stars
1k
Forks
377
Avg merge
4d 10h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby/setup-ruby

All issues in ruby/setup-ruby

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.