Skip to content

Commit

Permalink
use pwd for safedir instead of hard-coded folder (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmariglia authored and github-actions[bot] committed May 30, 2024
1 parent 205bcd2 commit 1073c38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions workflow-steps/checkout/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
4 changes: 1 addition & 3 deletions workflow-steps/checkout/output/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 1073c38

Please sign in to comment.