From 6f59c66836f18b252005237c8c10d1dd71d304ce Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Tue, 21 Jan 2020 08:59:16 -0800 Subject: [PATCH] Fix #7 using proper path joining --- README.md | 8 ++++++++ dist/index.js | 4 +++- index.js | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ec7bb0d..e547933 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ The Action has an output variable named filePath that you can use as this file i with: filelocation: ${{ steps.write_file.outputs.filePath }} ``` +## Building this repo +After making modifications to the source index.js file, to properly package the change you need to run + +``` +npm run package +``` + +which will modify/create the /dist folder with the final index.js output ## Contributors ✨ diff --git a/dist/index.js b/dist/index.js index 5c8e459..b6d0b8d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -55,9 +55,11 @@ module.exports = require("os"); const core = __webpack_require__(470); const fs = __webpack_require__(747); +const path = __webpack_require__(622); // get input parameter values from config -var fileName = process.env.RUNNER_TEMP + '/' + core.getInput('fileName'); +var fileName = path.join(process.env.RUNNER_TEMP,core.getInput('fileName')); + var encodedString = core.getInput('encodedString'); // most @actions toolkit packages have async methods diff --git a/index.js b/index.js index 37ea024..f49044a 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,10 @@ const core = require('@actions/core'); const fs = require('fs'); +const path = require('path'); // get input parameter values from config -var fileName = process.env.RUNNER_TEMP + '/' + core.getInput('fileName'); +var fileName = path.join(process.env.RUNNER_TEMP,core.getInput('fileName')); + var encodedString = core.getInput('encodedString'); // most @actions toolkit packages have async methods