Skip to content

Commit

Permalink
Improve find-python to add "Scripts" folder to PATH on Windows machin…
Browse files Browse the repository at this point in the history
…es (#169)

* added 'Scripts' folder to PATH on Windows

* add release code

* update index.js

* rebuild index.js

* remove duplicate block

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
Co-authored-by: Dmitry Shibanov <dmitry-shibanov@github.com>
  • Loading branch information
3 people committed Dec 17, 2020
1 parent 3b3f2de commit 2831efe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/index.js
Expand Up @@ -6738,6 +6738,10 @@ function usePyPy(majorVersion, architecture) {
core.exportVariable('pythonLocation', pythonLocation);
core.addPath(installDir);
core.addPath(_binDir);
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
if (IS_WINDOWS) {
core.addPath(path.join(installDir, 'Scripts'));
}
const impl = 'pypy' + majorVersion.toString();
core.setOutput('python-version', impl);
return { impl: impl, version: versionFromPath(installDir) };
Expand Down
4 changes: 4 additions & 0 deletions src/find-python.ts
Expand Up @@ -66,6 +66,10 @@ function usePyPy(

core.addPath(installDir);
core.addPath(_binDir);
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
if (IS_WINDOWS) {
core.addPath(path.join(installDir, 'Scripts'));
}

const impl = 'pypy' + majorVersion.toString();
core.setOutput('python-version', impl);
Expand Down

0 comments on commit 2831efe

Please sign in to comment.