Skip to content
This repository was archived by the owner on Jan 3, 2022. It is now read-only.

Commit cc6c01f

Browse files
committed
Fix
1 parent 7d0b75c commit cc6c01f

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

dist/index.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ module.exports = require("os");
5656
const core = __webpack_require__(470);
5757
const base64 = __webpack_require__(376);
5858
const path = __webpack_require__(622);
59+
const untildify = __webpack_require__(385);
60+
5961
// most @actions toolkit packages have async methods
6062
async 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

Comments
 (0)