diff options
author | obadz <obadz-git@obadz.com> | 2016-06-02 16:03:35 +0100 |
---|---|---|
committer | obadz <obadz-git@obadz.com> | 2016-06-03 13:38:41 +0100 |
commit | 4c5fdf42ed3612db4532bc2259dd3f7c6847e077 (patch) | |
tree | fb49f82dd2791b1d7cb45c3f43ab0d9a23c1bbc3 /nixos | |
parent | 30c94e10c3ab41d48db5fc45d6bc95491610d2d9 (diff) |
nixos/modules/misc/version.nix: check that .git is a directory
That's not the case for git submodules Fixes #15928
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/misc/version.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index fd7cadf76cc18..9a37f5950930c 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -104,8 +104,8 @@ in # changing them would not rebuild the manual nixosLabel = mkDefault (maybeEnv "NIXOS_LABEL" cfg.nixosVersion); nixosVersion = mkDefault (maybeEnv "NIXOS_VERSION" (cfg.nixosRelease + cfg.nixosVersionSuffix)); - nixosRevision = mkIf (pathExists gitRepo) (mkDefault gitCommitId); - nixosVersionSuffix = mkIf (pathExists gitRepo) (mkDefault (".git." + gitCommitId)); + nixosRevision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId); + nixosVersionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId)); # Note: code names must only increase in alphabetical order. nixosCodeName = "Flounder"; |