mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
lib/trivial: fix 'error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source''
happens on lazy-trees branch of Nix (NixOS/nix#6530)
This commit is contained in:
parent
1f3ebb2bd1
commit
b67ee6e861
|
@ -213,8 +213,8 @@ rec {
|
|||
# Default value to return if revision can not be determined
|
||||
default:
|
||||
let
|
||||
revisionFile = "${toString ./..}/.git-revision";
|
||||
gitRepo = "${toString ./..}/.git";
|
||||
revisionFile = ./.. + "/.git-revision";
|
||||
gitRepo = ./.. + "/.git";
|
||||
in if lib.pathIsGitRepo gitRepo
|
||||
then lib.commitIdFromGitRepo gitRepo
|
||||
else if lib.pathExists revisionFile then lib.fileContents revisionFile
|
||||
|
|
Loading…
Reference in a new issue