diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-07-11 17:05:53 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-07-11 17:05:53 +0200 |
commit | 0802e006f27acadc32c43ba02313709dfc51f940 (patch) | |
tree | 05d5f332500bab30e55e712178a371b41c829ddf /src/libexpr/flake | |
parent | ad42a784690449873fccb20192bd2150da81c56d (diff) |
Use "git add --force --intent-to-add" for flake.lock
Fixes
The following paths are ignored by one of your .gitignore files:
flake.lock
Diffstat (limited to 'src/libexpr/flake')
-rw-r--r-- | src/libexpr/flake/flake.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 8b9525680..abbb9a3e1 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -409,6 +409,8 @@ ResolvedFlake resolveFlake(EvalState & state, const FlakeRef & topRef, HandleLoc // Hack: Make sure that flake.lock is visible to Git, so it ends up in the Nix store. runProgram("git", true, { "-C", refData->path, "add", + "--force", + "--intent-to-add", (topRef.subdir == "" ? "" : topRef.subdir + "/") + "flake.lock" }); } else warn("cannot write lockfile of remote flake '%s'", topRef); |