From 24779e7d7889951e348dfa60f0629a558ae05751 Mon Sep 17 00:00:00 2001 From: pmariglia Date: Thu, 30 May 2024 10:55:53 -0400 Subject: [PATCH] use pwd for safedir instead of hard-coded folder (#56) --- workflow-steps/checkout/main.ts | 4 +--- workflow-steps/checkout/output/main.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/workflow-steps/checkout/main.ts b/workflow-steps/checkout/main.ts index ce46ba8..4378c6a 100644 --- a/workflow-steps/checkout/main.ts +++ b/workflow-steps/checkout/main.ts @@ -7,9 +7,7 @@ const depth = process.env.GIT_CHECKOUT_DEPTH || 1; const fetchTags = process.env.GIT_FETCH_TAGS === 'true'; if (process.platform != 'win32') { - execSync( - `git config --global --add safe.directory /home/workflows/workspace`, - ); + execSync(`git config --global --add safe.directory $PWD`); } execSync('git init .'); execSync(`git remote add origin ${repoUrl}`); diff --git a/workflow-steps/checkout/output/main.js b/workflow-steps/checkout/output/main.js index d754e46..fda6540 100644 --- a/workflow-steps/checkout/output/main.js +++ b/workflow-steps/checkout/output/main.js @@ -6,9 +6,7 @@ var nxBranch = process.env.NX_BRANCH; var depth = process.env.GIT_CHECKOUT_DEPTH || 1; var fetchTags = process.env.GIT_FETCH_TAGS === "true"; if (process.platform != "win32") { - (0, import_child_process.execSync)( - `git config --global --add safe.directory /home/workflows/workspace` - ); + (0, import_child_process.execSync)(`git config --global --add safe.directory $PWD`); } (0, import_child_process.execSync)("git init ."); (0, import_child_process.execSync)(`git remote add origin ${repoUrl}`);