Merge pull request #202370 from Artturin/revertpartof1

Revert "lib/trivial: fix 'error: cannot decode virtual path '/nix/sto…
This commit is contained in:
Artturi
2022-11-22 19:49:35 +02:00
committed by GitHub

View File

@@ -213,8 +213,8 @@ rec {
# Default value to return if revision can not be determined # Default value to return if revision can not be determined
default: default:
let let
revisionFile = ./.. + "/.git-revision"; revisionFile = "${toString ./..}/.git-revision";
gitRepo = ./.. + "/.git"; gitRepo = "${toString ./..}/.git";
in if lib.pathIsGitRepo gitRepo in if lib.pathIsGitRepo gitRepo
then lib.commitIdFromGitRepo gitRepo then lib.commitIdFromGitRepo gitRepo
else if lib.pathExists revisionFile then lib.fileContents revisionFile else if lib.pathExists revisionFile then lib.fileContents revisionFile