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

Trim trailing newlines from resolvedPyPyVersion #610

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/setup/index.js
Expand Up @@ -66283,7 +66283,7 @@ function findPyPyVersion(versionSpec, architecture, updateEnvironment, checkLate
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 };
});
Expand Down Expand Up @@ -66699,7 +66699,7 @@ function findRelease(releases, pythonVersion, pypyVersion, architecture, include
return {
foundAsset,
resolvedPythonVersion: foundRelease.python_version,
resolvedPyPyVersion: foundRelease.pypy_version
resolvedPyPyVersion: foundRelease.pypy_version.trim()
};
}
exports.findRelease = findRelease;
Expand Down Expand Up @@ -67095,7 +67095,7 @@ function readExactPyPyVersionFile(installDir) {
let pypyVersion = '';
let fileVersion = path.join(installDir, PYPY_VERSION_FILE);
if (fs_1.default.existsSync(fileVersion)) {
pypyVersion = fs_1.default.readFileSync(fileVersion).toString();
pypyVersion = fs_1.default.readFileSync(fileVersion).toString().trim();
}
return pypyVersion;
}
Expand Down
2 changes: 1 addition & 1 deletion src/find-pypy.ts
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/install-pypy.ts
Expand Up @@ -233,7 +233,7 @@ export function findRelease(
return {
foundAsset,
resolvedPythonVersion: foundRelease.python_version,
resolvedPyPyVersion: foundRelease.pypy_version
resolvedPyPyVersion: foundRelease.pypy_version.trim()
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Expand Up @@ -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;
Expand Down