Skip to content

Commit b67ee6e

Browse files
committed
lib/trivial: fix 'error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source''
happens on lazy-trees branch of Nix (NixOS/nix#6530)
1 parent 1f3ebb2 commit b67ee6e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/trivial.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ rec {
213213
# Default value to return if revision can not be determined
214214
default:
215215
let
216-
revisionFile = "${toString ./..}/.git-revision";
217-
gitRepo = "${toString ./..}/.git";
216+
revisionFile = ./.. + "/.git-revision";
217+
gitRepo = ./.. + "/.git";
218218
in if lib.pathIsGitRepo gitRepo
219219
then lib.commitIdFromGitRepo gitRepo
220220
else if lib.pathExists revisionFile then lib.fileContents revisionFile

0 commit comments

Comments
 (0)