We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b751d52 commit 5f4b562Copy full SHA for 5f4b562
src/main.ts
@@ -1,5 +1,6 @@
1
import * as core from '@actions/core'
2
import * as fs from 'fs'
3
+import * as path from 'path'
4
5
async function run(): Promise<void> {
6
try {
@@ -9,7 +10,8 @@ async function run(): Promise<void> {
9
10
core.info(`Found filename: ${fileName}`)
11
core.info(`Found json: ${json}`)
12
- fs.writeFileSync(fileName, json)
13
+ const filePath = path.resolve(fileName)
14
+ fs.writeFileSync(filePath, json)
15
core.info(`File written successfully`)
16
} catch (error) {
17
if (error instanceof Error) core.setFailed(error.message)
0 commit comments