@@ -19,7 +19,13 @@ module.exports =
1919/******/ } ;
2020/******/
2121/******/ // Execute the module function
22- /******/ modules [ moduleId ] . call ( module . exports , module , module . exports , __webpack_require__ ) ;
22+ /******/ var threw = true ;
23+ /******/ try {
24+ /******/ modules [ moduleId ] . call ( module . exports , module , module . exports , __webpack_require__ ) ;
25+ /******/ threw = false ;
26+ /******/ } finally {
27+ /******/ if ( threw ) delete installedModules [ moduleId ] ;
28+ /******/ }
2329/******/
2430/******/ // Flag the module as loaded
2531/******/ module . l = true ;
@@ -354,13 +360,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
354360 step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
355361 } ) ;
356362} ;
363+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
364+ if ( mod && mod . __esModule ) return mod ;
365+ var result = { } ;
366+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
367+ result [ "default" ] = mod ;
368+ return result ;
369+ } ;
357370Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
358- const os = __webpack_require__ ( 87 ) ;
359- const events = __webpack_require__ ( 614 ) ;
360- const child = __webpack_require__ ( 129 ) ;
361- const path = __webpack_require__ ( 622 ) ;
362- const io = __webpack_require__ ( 1 ) ;
363- const ioUtil = __webpack_require__ ( 672 ) ;
371+ const os = __importStar ( __webpack_require__ ( 87 ) ) ;
372+ const events = __importStar ( __webpack_require__ ( 614 ) ) ;
373+ const child = __importStar ( __webpack_require__ ( 129 ) ) ;
374+ const path = __importStar ( __webpack_require__ ( 622 ) ) ;
375+ const io = __importStar ( __webpack_require__ ( 1 ) ) ;
376+ const ioUtil = __importStar ( __webpack_require__ ( 672 ) ) ;
364377/* eslint-disable @typescript-eslint/unbound-method */
365378const IS_WINDOWS = process . platform === 'win32' ;
366379/*
@@ -804,6 +817,12 @@ class ToolRunner extends events.EventEmitter {
804817 resolve ( exitCode ) ;
805818 }
806819 } ) ;
820+ if ( this . options . input ) {
821+ if ( ! cp . stdin ) {
822+ throw new Error ( 'child process missing stdin' ) ;
823+ }
824+ cp . stdin . end ( this . options . input ) ;
825+ }
807826 } ) ;
808827 } ) ;
809828 }
@@ -934,13 +953,75 @@ class ExecState extends events.EventEmitter {
934953
935954/***/ } ) ,
936955
956+ /***/ 82 :
957+ /***/ ( function ( __unusedmodule , exports ) {
958+
959+ "use strict" ;
960+
961+ // We use any as a valid input type
962+ /* eslint-disable @typescript-eslint/no-explicit-any */
963+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
964+ /**
965+ * Sanitizes an input into a string so it can be passed into issueCommand safely
966+ * @param input input to sanitize into a string
967+ */
968+ function toCommandValue ( input ) {
969+ if ( input === null || input === undefined ) {
970+ return '' ;
971+ }
972+ else if ( typeof input === 'string' || input instanceof String ) {
973+ return input ;
974+ }
975+ return JSON . stringify ( input ) ;
976+ }
977+ exports . toCommandValue = toCommandValue ;
978+ //# sourceMappingURL=utils.js.map
979+
980+ /***/ } ) ,
981+
937982/***/ 87 :
938983/***/ ( function ( module ) {
939984
940985module . exports = require ( "os" ) ;
941986
942987/***/ } ) ,
943988
989+ /***/ 102 :
990+ /***/ ( function ( __unusedmodule , exports , __webpack_require__ ) {
991+
992+ "use strict" ;
993+
994+ // For internal use, subject to change.
995+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
996+ if ( mod && mod . __esModule ) return mod ;
997+ var result = { } ;
998+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
999+ result [ "default" ] = mod ;
1000+ return result ;
1001+ } ;
1002+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1003+ // We use any as a valid input type
1004+ /* eslint-disable @typescript-eslint/no-explicit-any */
1005+ const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
1006+ const os = __importStar ( __webpack_require__ ( 87 ) ) ;
1007+ const utils_1 = __webpack_require__ ( 82 ) ;
1008+ function issueCommand ( command , message ) {
1009+ const filePath = process . env [ `GITHUB_${ command } ` ] ;
1010+ if ( ! filePath ) {
1011+ throw new Error ( `Unable to find environment variable for file command ${ command } ` ) ;
1012+ }
1013+ if ( ! fs . existsSync ( filePath ) ) {
1014+ throw new Error ( `Missing file at path: ${ filePath } ` ) ;
1015+ }
1016+ fs . appendFileSync ( filePath , `${ utils_1 . toCommandValue ( message ) } ${ os . EOL } ` , {
1017+ encoding : 'utf8'
1018+ } ) ;
1019+ }
1020+ exports . issueCommand = issueCommand ;
1021+ //# sourceMappingURL=file-command.js.map
1022+
1023+ /***/ } ) ,
1024+
9441025/***/ 129 :
9451026/***/ ( function ( module ) {
9461027
@@ -969,6 +1050,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
9691050} ;
9701051Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
9711052const os = __importStar ( __webpack_require__ ( 87 ) ) ;
1053+ const utils_1 = __webpack_require__ ( 82 ) ;
9721054/**
9731055 * Commands
9741056 *
@@ -1023,13 +1105,13 @@ class Command {
10231105 }
10241106}
10251107function escapeData ( s ) {
1026- return ( s || '' )
1108+ return utils_1 . toCommandValue ( s )
10271109 . replace ( / % / g, '%25' )
10281110 . replace ( / \r / g, '%0D' )
10291111 . replace ( / \n / g, '%0A' ) ;
10301112}
10311113function escapeProperty ( s ) {
1032- return ( s || '' )
1114+ return utils_1 . toCommandValue ( s )
10331115 . replace ( / % / g, '%25' )
10341116 . replace ( / \r / g, '%0D' )
10351117 . replace ( / \n / g, '%0A' )
@@ -1063,6 +1145,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
10631145} ;
10641146Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
10651147const command_1 = __webpack_require__ ( 431 ) ;
1148+ const file_command_1 = __webpack_require__ ( 102 ) ;
1149+ const utils_1 = __webpack_require__ ( 82 ) ;
10661150const os = __importStar ( __webpack_require__ ( 87 ) ) ;
10671151const path = __importStar ( __webpack_require__ ( 622 ) ) ;
10681152/**
@@ -1085,11 +1169,21 @@ var ExitCode;
10851169/**
10861170 * Sets env variable for this action and future actions in the job
10871171 * @param name the name of the variable to set
1088- * @param val the value of the variable
1172+ * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
10891173 */
1174+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10901175function exportVariable ( name , val ) {
1091- process . env [ name ] = val ;
1092- command_1 . issueCommand ( 'set-env' , { name } , val ) ;
1176+ const convertedVal = utils_1 . toCommandValue ( val ) ;
1177+ process . env [ name ] = convertedVal ;
1178+ const filePath = process . env [ 'GITHUB_ENV' ] || '' ;
1179+ if ( filePath ) {
1180+ const delimiter = '_GitHubActionsFileCommandDelimeter_' ;
1181+ const commandValue = `${ name } <<${ delimiter } ${ os . EOL } ${ convertedVal } ${ os . EOL } ${ delimiter } ` ;
1182+ file_command_1 . issueCommand ( 'ENV' , commandValue ) ;
1183+ }
1184+ else {
1185+ command_1 . issueCommand ( 'set-env' , { name } , convertedVal ) ;
1186+ }
10931187}
10941188exports . exportVariable = exportVariable ;
10951189/**
@@ -1105,7 +1199,13 @@ exports.setSecret = setSecret;
11051199 * @param inputPath
11061200 */
11071201function addPath ( inputPath ) {
1108- command_1 . issueCommand ( 'add-path' , { } , inputPath ) ;
1202+ const filePath = process . env [ 'GITHUB_PATH' ] || '' ;
1203+ if ( filePath ) {
1204+ file_command_1 . issueCommand ( 'PATH' , inputPath ) ;
1205+ }
1206+ else {
1207+ command_1 . issueCommand ( 'add-path' , { } , inputPath ) ;
1208+ }
11091209 process . env [ 'PATH' ] = `${ inputPath } ${ path . delimiter } ${ process . env [ 'PATH' ] } ` ;
11101210}
11111211exports . addPath = addPath ;
@@ -1128,12 +1228,22 @@ exports.getInput = getInput;
11281228 * Sets the value of an output.
11291229 *
11301230 * @param name name of the output to set
1131- * @param value value to store
1231+ * @param value value to store. Non-string values will be converted to a string via JSON.stringify
11321232 */
1233+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11331234function setOutput ( name , value ) {
11341235 command_1 . issueCommand ( 'set-output' , { name } , value ) ;
11351236}
11361237exports . setOutput = setOutput ;
1238+ /**
1239+ * Enables or disables the echoing of commands into stdout for the rest of the step.
1240+ * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
1241+ *
1242+ */
1243+ function setCommandEcho ( enabled ) {
1244+ command_1 . issue ( 'echo' , enabled ? 'on' : 'off' ) ;
1245+ }
1246+ exports . setCommandEcho = setCommandEcho ;
11371247//-----------------------------------------------------------------------
11381248// Results
11391249//-----------------------------------------------------------------------
@@ -1167,18 +1277,18 @@ function debug(message) {
11671277exports . debug = debug ;
11681278/**
11691279 * Adds an error issue
1170- * @param message error issue message
1280+ * @param message error issue message. Errors will be converted to string via toString()
11711281 */
11721282function error ( message ) {
1173- command_1 . issue ( 'error' , message ) ;
1283+ command_1 . issue ( 'error' , message instanceof Error ? message . toString ( ) : message ) ;
11741284}
11751285exports . error = error ;
11761286/**
11771287 * Adds an warning issue
1178- * @param message warning issue message
1288+ * @param message warning issue message. Errors will be converted to string via toString()
11791289 */
11801290function warning ( message ) {
1181- command_1 . issue ( 'warning' , message ) ;
1291+ command_1 . issue ( 'warning' , message instanceof Error ? message . toString ( ) : message ) ;
11821292}
11831293exports . warning = warning ;
11841294/**
@@ -1236,8 +1346,9 @@ exports.group = group;
12361346 * Saves state for current action, the state can only be retrieved by this action's post job execution.
12371347 *
12381348 * @param name name of the state to store
1239- * @param value value to store
1349+ * @param value value to store. Non-string values will be converted to a string via JSON.stringify
12401350 */
1351+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12411352function saveState ( name , value ) {
12421353 command_1 . issueCommand ( 'save-state' , { name } , value ) ;
12431354}
@@ -1491,14 +1602,27 @@ module.exports = require("fs");
14911602
14921603"use strict" ;
14931604
1605+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
1606+ if ( k2 === undefined ) k2 = k ;
1607+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
1608+ } ) : ( function ( o , m , k , k2 ) {
1609+ if ( k2 === undefined ) k2 = k ;
1610+ o [ k2 ] = m [ k ] ;
1611+ } ) ) ;
1612+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
1613+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
1614+ } ) : function ( o , v ) {
1615+ o [ "default" ] = v ;
1616+ } ) ;
14941617var __importStar = ( this && this . __importStar ) || function ( mod ) {
14951618 if ( mod && mod . __esModule ) return mod ;
14961619 var result = { } ;
1497- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
1498- result [ "default" ] = mod ;
1620+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
1621+ __setModuleDefault ( result , mod ) ;
14991622 return result ;
15001623} ;
15011624Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1625+ exports . CocoapodsInstaller = void 0 ;
15021626const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
15031627const path = __importStar ( __webpack_require__ ( 622 ) ) ;
15041628const os_1 = __webpack_require__ ( 87 ) ;
@@ -1561,11 +1685,23 @@ CocoapodsInstaller.podVersionRegex = /^COCOAPODS: ([\d.]+)$/i;
15611685
15621686"use strict" ;
15631687
1688+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
1689+ if ( k2 === undefined ) k2 = k ;
1690+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
1691+ } ) : ( function ( o , m , k , k2 ) {
1692+ if ( k2 === undefined ) k2 = k ;
1693+ o [ k2 ] = m [ k ] ;
1694+ } ) ) ;
1695+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
1696+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
1697+ } ) : function ( o , v ) {
1698+ o [ "default" ] = v ;
1699+ } ) ;
15641700var __importStar = ( this && this . __importStar ) || function ( mod ) {
15651701 if ( mod && mod . __esModule ) return mod ;
15661702 var result = { } ;
1567- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
1568- result [ "default" ] = mod ;
1703+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
1704+ __setModuleDefault ( result , mod ) ;
15691705 return result ;
15701706} ;
15711707Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
@@ -1611,8 +1747,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
16111747 step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
16121748 } ) ;
16131749} ;
1750+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
1751+ if ( mod && mod . __esModule ) return mod ;
1752+ var result = { } ;
1753+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
1754+ result [ "default" ] = mod ;
1755+ return result ;
1756+ } ;
16141757Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1615- const tr = __webpack_require__ ( 9 ) ;
1758+ const tr = __importStar ( __webpack_require__ ( 9 ) ) ;
16161759/**
16171760 * Exec a command.
16181761 * Output will be streamed to the live console.
0 commit comments