Skip to content

Commit 6f59c66

Browse files
committed
Fix #7 using proper path joining
1 parent ddf9dac commit 6f59c66

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ The Action has an output variable named filePath that you can use as this file i
3232
with:
3333
filelocation: ${{ steps.write_file.outputs.filePath }}
3434
```
35+
## Building this repo
36+
After making modifications to the source index.js file, to properly package the change you need to run
37+
38+
```
39+
npm run package
40+
```
41+
42+
which will modify/create the /dist folder with the final index.js output
3543

3644
## Contributors ✨
3745

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ module.exports = require("os");
5555

5656
const core = __webpack_require__(470);
5757
const fs = __webpack_require__(747);
58+
const path = __webpack_require__(622);
5859

5960
// get input parameter values from config
60-
var fileName = process.env.RUNNER_TEMP + '/' + core.getInput('fileName');
61+
var fileName = path.join(process.env.RUNNER_TEMP,core.getInput('fileName'));
62+
6163
var encodedString = core.getInput('encodedString');
6264

6365
// most @actions toolkit packages have async methods

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
const core = require('@actions/core');
22
const fs = require('fs');
3+
const path = require('path');
34

45
// get input parameter values from config
5-
var fileName = process.env.RUNNER_TEMP + '/' + core.getInput('fileName');
6+
var fileName = path.join(process.env.RUNNER_TEMP,core.getInput('fileName'));
7+
68
var encodedString = core.getInput('encodedString');
79

810
// most @actions toolkit packages have async methods

0 commit comments

Comments
 (0)