1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-10 13:22:20 +02:00

Trim trailing newlines from resolvedPyPyVersion (#610)

Fixes #609
This commit is contained in:
Kurt McKee 2023-02-20 04:28:16 -06:00 committed by GitHub
parent 3faddefb4c
commit 869e769ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -98,7 +98,7 @@ export async function findPyPyVersion(
core.addPath(pythonLocation);
core.addPath(_binDir);
}
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim());
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion);
core.setOutput('python-path', pythonPath);
return {resolvedPyPyVersion, resolvedPythonVersion};

View file

@ -233,7 +233,7 @@ export function findRelease(
return {
foundAsset,
resolvedPythonVersion: foundRelease.python_version,
resolvedPyPyVersion: foundRelease.pypy_version
resolvedPyPyVersion: foundRelease.pypy_version.trim()
};
}

View file

@ -73,7 +73,7 @@ export function readExactPyPyVersionFile(installDir: string) {
let pypyVersion = '';
let fileVersion = path.join(installDir, PYPY_VERSION_FILE);
if (fs.existsSync(fileVersion)) {
pypyVersion = fs.readFileSync(fileVersion).toString();
pypyVersion = fs.readFileSync(fileVersion).toString().trim();
}
return pypyVersion;