@@ -22,7 +22,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
2222var __importStar = ( this && this . __importStar ) || function ( mod ) {
2323 if ( mod && mod . __esModule ) return mod ;
2424 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 ) ;
2626 __setModuleDefault ( result , mod ) ;
2727 return result ;
2828} ;
@@ -96,7 +96,9 @@ function downloadRelease(version) {
9696 downloadPath = yield tc . downloadTool ( downloadUrl , undefined , token ) ;
9797 }
9898 catch ( error ) {
99- core . debug ( error ) ;
99+ if ( typeof error === "string" || error instanceof Error ) {
100+ core . debug ( error . toString ( ) ) ;
101+ }
100102 throw `Failed to download version ${ version } : ${ error } ` ;
101103 }
102104 // Extract
@@ -243,7 +245,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
243245var __importStar = ( this && this . __importStar ) || function ( mod ) {
244246 if ( mod && mod . __esModule ) return mod ;
245247 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 ) ;
247249 __setModuleDefault ( result , mod ) ;
248250 return result ;
249251} ;
@@ -302,13 +304,18 @@ function run() {
302304 }
303305 const options = {
304306 env : {
305- ARDUINO_LINT_OFFICIAL : official ,
307+ ARDUINO_LINT_OFFICIAL : official , // The official mode is set via an environment variable.
306308 } ,
307309 } ;
308310 yield exec . exec ( toolPath , execArgs , options ) ;
309311 }
310312 catch ( error ) {
311- core . setFailed ( error . message ) ;
313+ if ( error instanceof Error ) {
314+ core . setFailed ( error . message ) ;
315+ }
316+ else {
317+ throw error ;
318+ }
312319 }
313320 } ) ;
314321}
0 commit comments