mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-04-08 08:19:57 +00:00
Inconsistent splitting behavior fix
This commit is contained in:
@ -215,6 +215,7 @@ class DotnetCoreInstaller {
|
||||
if (downloadUrls.length == 0) {
|
||||
throw `Could not construct download URL. Please ensure that specified version ${version} is valid.`;
|
||||
}
|
||||
core.debug(`Got download urls ${downloadUrls}`);
|
||||
return downloadUrls;
|
||||
});
|
||||
}
|
||||
@ -276,6 +277,10 @@ class DotnetCoreInstaller {
|
||||
let legacyUrl = '';
|
||||
if (!!output && output.length > 0) {
|
||||
let lines = output.split(os.EOL);
|
||||
// Fallback to \n if initial split doesn't work (not consistent across versions)
|
||||
if (lines.length === 1) {
|
||||
lines = output.split('\n');
|
||||
}
|
||||
if (!!lines && lines.length > 0) {
|
||||
lines.forEach((line) => {
|
||||
if (!line) {
|
||||
|
Reference in New Issue
Block a user