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

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
frostebite committed Jul 24, 2020
1 parent 7d0b75c commit cc6c01f
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ module.exports = require("os");
const core = __webpack_require__(470);
const base64 = __webpack_require__(376);
const path = __webpack_require__(622);
const untildify = __webpack_require__(385);

// most @actions toolkit packages have async methods
async function run() {
try {
const filePath = core.getInput('filePath');
const filePath = untildify(core.getInput('filePath'));
let promise = new Promise(function(resolve, reject) {
base64.encode(path.normalize(filePath), function(err, base64String) {
if(err){
Expand All @@ -68,7 +70,8 @@ async function run() {
reject(err);
return;
}
core.info("Base64 encode successful of"+filePath)
core.info("Base64 encode successful of"+filePath);
core.setSecret(base64String);
core.setOutput('base64', base64String);
resolve();
});
Expand Down Expand Up @@ -2225,6 +2228,26 @@ module.exports = {
}


/***/ }),

/***/ 385:
/***/ (function(module, __unusedexports, __webpack_require__) {

"use strict";

const os = __webpack_require__(87);

const homeDirectory = os.homedir();

module.exports = pathWithTilde => {
if (typeof pathWithTilde !== 'string') {
throw new TypeError(`Expected a string, got ${typeof pathWithTilde}`);
}

return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde;
};


/***/ }),

/***/ 413:
Expand Down

0 comments on commit cc6c01f

Please sign in to comment.