File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ class DotnetCoreInstaller {
215215 if ( downloadUrls . length == 0 ) {
216216 throw `Could not construct download URL. Please ensure that specified version ${ version } is valid.` ;
217217 }
218+ core . debug ( `Got download urls ${ downloadUrls } ` ) ;
218219 return downloadUrls ;
219220 } ) ;
220221 }
@@ -276,6 +277,10 @@ class DotnetCoreInstaller {
276277 let legacyUrl = '' ;
277278 if ( ! ! output && output . length > 0 ) {
278279 let lines = output . split ( os . EOL ) ;
280+ // Fallback to \n if initial split doesn't work (not consistent across versions)
281+ if ( lines . length === 1 ) {
282+ lines = output . split ( '\n' ) ;
283+ }
279284 if ( ! ! lines && lines . length > 0 ) {
280285 lines . forEach ( ( line ) => {
281286 if ( ! line ) {
Original file line number Diff line number Diff line change @@ -232,6 +232,8 @@ export class DotnetCoreInstaller {
232232 throw `Could not construct download URL. Please ensure that specified version ${ version } is valid.` ;
233233 }
234234
235+ core . debug ( `Got download urls ${ downloadUrls } ` ) ;
236+
235237 return downloadUrls ;
236238 }
237239
@@ -307,6 +309,11 @@ export class DotnetCoreInstaller {
307309 let legacyUrl : string = '' ;
308310 if ( ! ! output && output . length > 0 ) {
309311 let lines : string [ ] = output . split ( os . EOL ) ;
312+
313+ // Fallback to \n if initial split doesn't work (not consistent across versions)
314+ if ( lines . length === 1 ) {
315+ lines = output . split ( '\n' ) ;
316+ }
310317 if ( ! ! lines && lines . length > 0 ) {
311318 lines . forEach ( ( line : string ) => {
312319 if ( ! line ) {
You can’t perform that action at this time.
0 commit comments