Skip to content

Commit 869e769

Browse files
authored
Trim trailing newlines from resolvedPyPyVersion (actions#610)
Fixes actions#609
1 parent 3faddef commit 869e769

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dist/setup/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66283,7 +66283,7 @@ function findPyPyVersion(versionSpec, architecture, updateEnvironment, checkLate
6628366283
core.addPath(pythonLocation);
6628466284
core.addPath(_binDir);
6628566285
}
66286-
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim());
66286+
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion);
6628766287
core.setOutput('python-path', pythonPath);
6628866288
return { resolvedPyPyVersion, resolvedPythonVersion };
6628966289
});
@@ -66699,7 +66699,7 @@ function findRelease(releases, pythonVersion, pypyVersion, architecture, include
6669966699
return {
6670066700
foundAsset,
6670166701
resolvedPythonVersion: foundRelease.python_version,
66702-
resolvedPyPyVersion: foundRelease.pypy_version
66702+
resolvedPyPyVersion: foundRelease.pypy_version.trim()
6670366703
};
6670466704
}
6670566705
exports.findRelease = findRelease;
@@ -67095,7 +67095,7 @@ function readExactPyPyVersionFile(installDir) {
6709567095
let pypyVersion = '';
6709667096
let fileVersion = path.join(installDir, PYPY_VERSION_FILE);
6709767097
if (fs_1.default.existsSync(fileVersion)) {
67098-
pypyVersion = fs_1.default.readFileSync(fileVersion).toString();
67098+
pypyVersion = fs_1.default.readFileSync(fileVersion).toString().trim();
6709967099
}
6710067100
return pypyVersion;
6710167101
}

src/find-pypy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export async function findPyPyVersion(
9898
core.addPath(pythonLocation);
9999
core.addPath(_binDir);
100100
}
101-
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim());
101+
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion);
102102
core.setOutput('python-path', pythonPath);
103103

104104
return {resolvedPyPyVersion, resolvedPythonVersion};

src/install-pypy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export function findRelease(
233233
return {
234234
foundAsset,
235235
resolvedPythonVersion: foundRelease.python_version,
236-
resolvedPyPyVersion: foundRelease.pypy_version
236+
resolvedPyPyVersion: foundRelease.pypy_version.trim()
237237
};
238238
}
239239

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function readExactPyPyVersionFile(installDir: string) {
7373
let pypyVersion = '';
7474
let fileVersion = path.join(installDir, PYPY_VERSION_FILE);
7575
if (fs.existsSync(fileVersion)) {
76-
pypyVersion = fs.readFileSync(fileVersion).toString();
76+
pypyVersion = fs.readFileSync(fileVersion).toString().trim();
7777
}
7878

7979
return pypyVersion;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy