Skip to content

Commit 125cc1c

Browse files
committed
fix safe warning
taken from input-output-hk#2156
1 parent 7783158 commit 125cc1c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/call-cabal-project-to-nix.nix

+6-1
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,14 @@ let
268268
sourceRepos = sourceReposBuild;
269269
inherit (repoResult) repos extra-hackages;
270270
makeFixedProjectFile = ''
271+
HOME=$(mktemp -d)
271272
cp -f ${evalPackages.writeText "cabal.project" sourceRepoFixedProjectFile} ./cabal.project
272273
chmod +w -R ./cabal.project
273-
'';
274+
'' + pkgs.lib.strings.concatStrings (
275+
map (f: ''
276+
git config --global --add safe.directory ${f.location}/.git
277+
'') sourceReposEval
278+
);
274279
# This will be used to replace refernces to the minimal git repos with just the index
275280
# of the repo. The index will be used in lib/import-and-filter-project.nix to
276281
# lookup the correct repository in `sourceReposBuild`. This avoids having

0 commit comments

Comments
 (0)