mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-22 01:00:50 +00:00
fix: Add Cmd Default/Input support to cleanup
Bring `post` actions step into consistency with `main` for changes introduced in #154 Without this change, `sshAgentCmd` is undefined when passed to `execFileSync()` during `cleanup` and `post` is never successful.
This commit is contained in:
parent
5e1c7c157e
commit
83c3be0f44
2 changed files with 7 additions and 1 deletions
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
* Add Cmd Default/Input support to cleanup (fixes #208)
|
||||
|
||||
## v0.9.0 [2024-02-06]
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
const core = require('@actions/core');
|
||||
const { execFileSync } = require('child_process');
|
||||
const { sshAgentCmd } = require('./paths.js');
|
||||
const { sshAgentCmdDefault } = require('./paths.js');
|
||||
|
||||
try {
|
||||
const sshAgentCmdInput = core.getInput('ssh-agent-cmd');
|
||||
const sshAgentCmd = sshAgentCmdInput ? sshAgentCmdInput : sshAgentCmdDefault;
|
||||
// Kill the started SSH agent
|
||||
console.log('Stopping SSH agent');
|
||||
execFileSync(sshAgentCmd, ['-k'], { stdio: 'inherit' });
|
||||
|
|
Loading…
Reference in a new issue