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

Diff for: dist/setup/index.js

+3-3
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
}

Diff for: src/find-pypy.ts

+1-1
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};

Diff for: src/install-pypy.ts

+1-1
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

Diff for: src/utils.ts

+1-1
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)