@@ -56,10 +56,12 @@ module.exports = require("os");
5656const core = __webpack_require__ ( 470 ) ;
5757const base64 = __webpack_require__ ( 376 ) ;
5858const path = __webpack_require__ ( 622 ) ;
59+ const untildify = __webpack_require__ ( 385 ) ;
60+
5961// most @actions toolkit packages have async methods
6062async function run ( ) {
6163 try {
62- const filePath = core . getInput ( 'filePath' ) ;
64+ const filePath = untildify ( core . getInput ( 'filePath' ) ) ;
6365 let promise = new Promise ( function ( resolve , reject ) {
6466 base64 . encode ( path . normalize ( filePath ) , function ( err , base64String ) {
6567 if ( err ) {
@@ -68,7 +70,8 @@ async function run() {
6870 reject ( err ) ;
6971 return ;
7072 }
71- core . info ( "Base64 encode successful of" + filePath )
73+ core . info ( "Base64 encode successful of" + filePath ) ;
74+ core . setSecret ( base64String ) ;
7275 core . setOutput ( 'base64' , base64String ) ;
7376 resolve ( ) ;
7477 } ) ;
@@ -2225,6 +2228,26 @@ module.exports = {
22252228}
22262229
22272230
2231+ /***/ } ) ,
2232+
2233+ /***/ 385 :
2234+ /***/ ( function ( module , __unusedexports , __webpack_require__ ) {
2235+
2236+ "use strict" ;
2237+
2238+ const os = __webpack_require__ ( 87 ) ;
2239+
2240+ const homeDirectory = os . homedir ( ) ;
2241+
2242+ module . exports = pathWithTilde => {
2243+ if ( typeof pathWithTilde !== 'string' ) {
2244+ throw new TypeError ( `Expected a string, got ${ typeof pathWithTilde } ` ) ;
2245+ }
2246+
2247+ return homeDirectory ? pathWithTilde . replace ( / ^ ~ (? = $ | \/ | \\ ) / , homeDirectory ) : pathWithTilde ;
2248+ } ;
2249+
2250+
22282251/***/ } ) ,
22292252
22302253/***/ 413 :
0 commit comments