Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 267a930

Browse files
authored
add safe dir (#1435) (#1436)
1 parent 773625d commit 267a930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/src/utils/image-content-extractor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ async function getGitRepositoryInfo(imageTagOrContainerName, gitRepos) {
333333
if (typeof repoPath === 'string') {
334334
console.log(`(*) Getting remote and commit for ${repoName} at ${repoPath}...`);
335335
// Go to the specified folder, see if the commands have already been run, if not run them and get output
336-
const remoteAndCommitOutput = await getCommandOutputFromContainer(imageTagOrContainerName, `cd \\"${repoPath}\\" && if [ -f \\".git-remote-and-commit\\" ]; then cat .git-remote-and-commit; else git remote get-url origin && git log -n 1 --pretty=format:%H -- . | tee /dev/null; fi`,true);
336+
const remoteAndCommitOutput = await getCommandOutputFromContainer(imageTagOrContainerName, `git config --global --add safe.directory \\"${repoPath}\\" && cd \\"${repoPath}\\" && if [ -f \\".git-remote-and-commit\\" ]; then cat .git-remote-and-commit; else git remote get-url origin && git log -n 1 --pretty=format:%H -- . | tee /dev/null; fi`,true);
337337
const [gitRemote, gitCommit] = remoteAndCommitOutput.split('\n');
338338
componentList.push({
339339
name: repoName,

0 commit comments

Comments
 (0)