Skip to content

Commit 83c3be0

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 5e1c7c1 commit 83c3be0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
* Add Cmd Default/Input support to cleanup (fixes #208)
13+
1014
## v0.9.0 [2024-02-06]
1115

1216
### 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)