feat(exec): add support for custom working directories

- Updates script execution to use `cwd` based on environment variables
- Enables better compatibility with GitHub Actions workflows
This commit is contained in:
2025-07-04 11:59:29 +02:00
parent 610ee118f3
commit 7892a1fa7c
2 changed files with 6 additions and 1 deletions

6
dist/main.js vendored
View File

@@ -3,7 +3,11 @@ const path = require("path");
const fs = require("fs");
function run(script) {
cp.execFileSync(script, { stdio: "inherit", shell: true });
cp.execFileSync(script, {
stdio: "inherit",
shell: true,
cwd: process.env.GITHUB_WORKSPACE || process.cwd()
});
}
function exportOutput(key, value) {

1
dist/post.js vendored
View File

@@ -7,6 +7,7 @@ function run(script, args = []) {
stdio: "inherit",
shell: true,
env: process.env,
cwd: process.env.GITHUB_WORKSPACE || process.cwd(),
});
}