After version 2.14 of nix, nix flake update ".?submodules=1" expects ./.git to be a directory, not a file.
(Only when using ?submodules=1 in my experience)
If its a file, like it is in a submodule. it will error and not finish.
Steps To Reproduce
Have nix version 2.14 or higher (havent tested beyond 2.18.1)
Have flake.nix inside a git-submodule (which then will have a .git file not a directory)
Run nix flake update ".?submodules=1"
See error:
making temporary clone of '/a/b/nixos-config'
… while fetching the input 'git+file:///a/b/nixos-config' error:
opening file '/a/b/nixos-config/.git/config': Not a directory.
fun fact: using nix flake update works, so this is only an issue when using nix flake update inside a git submodule that has git submodules.
Downgrading to 2.13 also works
Expected behavior
It should be able to handle .git being a file, like it is in git submodules.
I've been doing nix build "git+file://$(pwd)?submodules=1" in my project, and that quit working. Twist in my case is there's a submodule within a submodule; I only get the error for the sub-submodule.
Describe the bug
After version 2.14 of nix,
nix flake update ".?submodules=1"
expects./.git
to be a directory, not a file. (Only when using?submodules=1
in my experience) If its a file, like it is in a submodule. it will error and not finish.Steps To Reproduce
flake.nix
inside a git-submodule (which then will have a.git
file not a directory)nix flake update ".?submodules=1"
nix flake update
works, so this is only an issue when using nix flake update inside a git submodule that has git submodules.Expected behavior
It should be able to handle
.git
being a file, like it is in git submodules.Priorities
Add :+1: to issues you find important.