From c141b6062fdf9b4963f7f3ea6419300edef01019 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Sat, 14 Dec 2019 13:35:30 -0800 Subject: [PATCH] Changing paths and variable typo --- dist/index.js | 23 ++--------------------- index.js | 5 ++--- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2486fc1..2f51010 100644 --- a/dist/index.js +++ b/dist/index.js @@ -54,11 +54,10 @@ module.exports = require("os"); /***/ (function(__unusedmodule, __unusedexports, __webpack_require__) { const core = __webpack_require__(470); -const wait = __webpack_require__(949); const fs = __webpack_require__(747); // get input parameter values from config -var fileName = env['TEMP'] + '\\'+ core.getInput('fileName'); +var fileName = core.getInput('fileName'); var encodedString = core.getInput('encodedString'); // most @actions toolkit packages have async methods @@ -66,7 +65,7 @@ async function run() { try { const tempFile = Buffer.from(encodedString, 'base64'); - if (certificate.length == 0) + if (tempFile.length == 0) core.setFailed('Certificate value is not set'); await fs.writeFile(fileName, tempFile); @@ -352,24 +351,6 @@ module.exports = require("path"); module.exports = require("fs"); -/***/ }), - -/***/ 949: -/***/ (function(module) { - -let wait = function(milliseconds) { - return new Promise((resolve, reject) => { - if (typeof(milliseconds) !== 'number') { - throw new Error('milleseconds not a number'); - } - - setTimeout(() => resolve("done!"), milliseconds) - }); -} - -module.exports = wait; - - /***/ }) /******/ }); \ No newline at end of file diff --git a/index.js b/index.js index f4e312a..9cf5b62 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,8 @@ const core = require('@actions/core'); -const wait = require('./wait'); const fs = require('fs'); // get input parameter values from config -var fileName = env['TEMP'] + '\\'+ core.getInput('fileName'); +var fileName = core.getInput('fileName'); var encodedString = core.getInput('encodedString'); // most @actions toolkit packages have async methods @@ -11,7 +10,7 @@ async function run() { try { const tempFile = Buffer.from(encodedString, 'base64'); - if (certificate.length == 0) + if (tempFile.length == 0) core.setFailed('Certificate value is not set'); await fs.writeFile(fileName, tempFile);