Skip to content

Commit

Permalink
allow to use action on self hosted server where multiple runners are …
Browse files Browse the repository at this point in the history
…running and share temp directory
  • Loading branch information
simonjur committed Jul 29, 2024
1 parent 14e8390 commit 4210f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gitleaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const EXIT_CODE_LEAKS_DETECTED = 2;
// or use the latest version of gitleaks if GITLEAKS_VERSION is not specified.
// This function will also cache the downloaded gitleaks binary in the tool cache.
async function Install(version) {
const pathToInstall = path.join(os.tmpdir(), `gitleaks-${version}`);
const pathToInstall = path.join(os.tmpdir(), `gitleaks-${version}-${os.userInfo().username}`);
core.info(
`Version to install: ${version} (target directory: ${pathToInstall})`
);
Expand Down Expand Up @@ -50,7 +50,7 @@ async function Install(version) {
version
);

const tempPath = path.join(os.tmpdir(), `gitleaks-${version}.tmp`);
const tempPath = path.join(os.tmpdir(), `gitleaks-${version}-${os.userInfo().username}.tmp`);

if (!existsSync(tempPath)) {
core.info(`Downloading gitleaks from ${gitleaksReleaseURL}...`);
Expand Down

0 comments on commit 4210f9e

Please sign in to comment.