mirror of
https://github.com/actions/setup-python.git
synced 2025-07-25 05:48:21 +02:00
Extract common getBinaryDirectory function for PyPy and GraalPy
This commit is contained in:
parent
fb2947352f
commit
08f6b9181b
5 changed files with 28 additions and 29 deletions
|
@ -262,3 +262,12 @@ export function getVersionInputFromFile(versionFile: string): string[] {
|
|||
return getVersionInputFromPlainFile(versionFile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directory containing interpreter binary from installation directory of PyPy or GraalPy
|
||||
* - On Linux and macOS, the Python interpreter is in 'bin'.
|
||||
* - On Windows, it is in the installation root.
|
||||
*/
|
||||
export function getBinaryDirectory(installDir: string) {
|
||||
return IS_WINDOWS ? installDir : path.join(installDir, 'bin');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue