Fix #7 using proper path joining

This commit is contained in:
Tim Heuer
2020-01-21 08:59:16 -08:00
parent ddf9dac666
commit 6f59c66836
3 changed files with 14 additions and 2 deletions

View File

@@ -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 ✨

4
dist/index.js vendored
View File

@@ -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

View File

@@ -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