@@ -22,7 +22,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
22
22
var __importStar = ( this && this . __importStar ) || function ( mod ) {
23
23
if ( mod && mod . __esModule ) return mod ;
24
24
var result = { } ;
25
- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
25
+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
26
26
__setModuleDefault ( result , mod ) ;
27
27
return result ;
28
28
} ;
@@ -96,7 +96,9 @@ function downloadRelease(version) {
96
96
downloadPath = yield tc . downloadTool ( downloadUrl , undefined , token ) ;
97
97
}
98
98
catch ( error ) {
99
- core . debug ( error ) ;
99
+ if ( typeof error === "string" || error instanceof Error ) {
100
+ core . debug ( error . toString ( ) ) ;
101
+ }
100
102
throw `Failed to download version ${ version } : ${ error } ` ;
101
103
}
102
104
// Extract
@@ -243,7 +245,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
243
245
var __importStar = ( this && this . __importStar ) || function ( mod ) {
244
246
if ( mod && mod . __esModule ) return mod ;
245
247
var result = { } ;
246
- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
248
+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
247
249
__setModuleDefault ( result , mod ) ;
248
250
return result ;
249
251
} ;
@@ -302,13 +304,18 @@ function run() {
302
304
}
303
305
const options = {
304
306
env : {
305
- ARDUINO_LINT_OFFICIAL : official ,
307
+ ARDUINO_LINT_OFFICIAL : official , // The official mode is set via an environment variable.
306
308
} ,
307
309
} ;
308
310
yield exec . exec ( toolPath , execArgs , options ) ;
309
311
}
310
312
catch ( error ) {
311
- core . setFailed ( error . message ) ;
313
+ if ( error instanceof Error ) {
314
+ core . setFailed ( error . message ) ;
315
+ }
316
+ else {
317
+ throw error ;
318
+ }
312
319
}
313
320
} ) ;
314
321
}
0 commit comments