Skip to content

Commit

Permalink
lib/trivial: fix 'error: cannot decode virtual path '/nix/store/virtu…
Browse files Browse the repository at this point in the history
…al0000000000000000000000005-source''

happens on lazy-trees branch of Nix (NixOS/nix#6530)
  • Loading branch information
Artturin committed Nov 6, 2022
1 parent 1f3ebb2 commit b67ee6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/trivial.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b67ee6e

Please sign in to comment.