Compare commits

..
5 Commits
5 changed files with 10 additions and 8 deletions

No files matched your search

+1 -2
View File
@@ -7,11 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## v0.9.1 [2024-03-17]
### Fixed
* Fix path used to execute ssh-agent in cleanup.js to respect custom paths set by input (#235)
* Fix running with the .ssh directory already existing (#234)
## v0.9.0 [2024-02-06]
+1 -1
View File
@@ -20,7 +20,7 @@ inputs:
description: 'git command'
required: false
runs:
using: 'node24'
using: 'node20'
main: 'dist/index.js'
post: 'dist/cleanup.js'
post-if: 'always()'
+3 -1
View File
@@ -335,7 +335,9 @@ try {
}
const homeSsh = homePath + '/.ssh';
fs.mkdirSync(homeSsh, { recursive: true });
if (!fs.existsSync(buildDir)) {
fs.mkdirSync(homeSsh, { recursive: true });
}
console.log("Starting ssh-agent");
+3 -1
View File
@@ -15,7 +15,9 @@ try {
}
const homeSsh = homePath + '/.ssh';
fs.mkdirSync(homeSsh, { recursive: true });
if (!fs.existsSync(homeSsh)) {
fs.mkdirSync(homeSsh, { recursive: true });
}
console.log("Starting ssh-agent");
+2 -3
View File
@@ -2,9 +2,8 @@ const os = require('os');
const core = require('@actions/core');
const defaults = (process.env['OS'] != 'Windows_NT') ? {
// We use os.userInfo() rather than os.homedir(), since it uses the getpwuid() system call to get the user's home directory (see https://nodejs.org/api/os.html#osuserinfooptions).
// This mimics the way openssh derives the home directory for locating config files (see https://github.com/openssh/openssh-portable/blob/826483d51a9fee60703298bbf839d9ce37943474/ssh.c#L710);
// Makes a difference in Docker-based Action runs, when $HOME is different from what getpwuid() returns (which is based on the entry in /etc/passwd)
// Use getent() system call, since this is what ssh does; makes a difference in Docker-based
// Action runs, where $HOME is different from the pwent
homePath: os.userInfo().homedir,
sshAgentCmdDefault: 'ssh-agent',
sshAddCmdDefault: 'ssh-add',