Skip to content

Commit

Permalink
Add cwd parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Dec 20, 2024
1 parent d49e4b5 commit a1a2589
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion githubActions/cleanup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const child_process = require('child_process');
const path = require('path');

child_process.execFileSync(
'just', ['nuke'],
{ stdio: 'inherit' }
{
stdio: 'inherit',
cwd: path.resolve(__dirname, '..')
}
);
9 changes: 7 additions & 2 deletions githubActions/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const child_process = require('child_process');
const path = require('path');

const CONTAINER_ENGINE = process.env.INPUT_ENGINE;
const JUST_COMMAND = process.env.INPUT_COMMAND;

const script = `
set -x
cd ${__dirname}/..
just prefer ${CONTAINER_ENGINE}
# start-up is being retried as a workaround for
Expand All @@ -28,5 +28,10 @@ fi
exit $rc
`;

child_process.execFileSync('bash', ['-c', script], { stdio: 'inherit' });
child_process.execFileSync('bash', ['-c', script],
{
stdio: 'inherit',
cwd: path.resolve(__dirname, '..')
}
);

0 comments on commit a1a2589

Please sign in to comment.