Skip to content

Commit a03ef9d

Browse files
committed
fix: Add Cmd Default/Input support to cleanup
Bring `post` actions step into consistency with `main` for changes introduced in webfactory#154 Without this change, `sshAgentCmd` is undefined when passed to `execFileSync()` during `cleanup` and `post` is never successful.
1 parent dc588b6 commit a03ef9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cleanup.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 { execFileSync } = require('child_process');
3-
const { sshAgentCmd } = require('./paths.js');
3+
const { sshAgentCmdDefault } = require('./paths.js');
44

55
try {
6+
const sshAgentCmdInput = core.getInput('ssh-agent-cmd');
7+
const sshAgentCmd = sshAgentCmdInput ? sshAgentCmdInput : sshAgentCmdDefault;
68
// Kill the started SSH agent
79
console.log('Stopping SSH agent');
810
execFileSync(sshAgentCmd, ['-k'], { stdio: 'inherit' });

0 commit comments

Comments
 (0)