Skip to content

Commit

Permalink
fix(nixery): Avoid impure reading of .git directory
Browse files Browse the repository at this point in the history
Change-Id: I67405f9c9bd9cc8cb34fafff80e30b2fca53a2b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5502
Tested-by: BuildkiteCI
Reviewed-by: tazjin <[email protected]>
Autosubmit: tazjin <[email protected]>
  • Loading branch information
tazjin authored and clbot committed Apr 21, 2022
1 parent 73f0087 commit 2bfbfa9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ with pkgs;
let
inherit (pkgs) buildGoModule;

# Current Nixery commit - this is used as the Nixery version in
# builds to distinguish errors between deployed versions, see
# server/logs.go for details.
gitDir = if builtins.pathExists ./.git then ./.git else ../../.git;
nixery-commit-hash = args.commitHash or pkgs.lib.commitIdFromGitRepo gitDir;
# Avoid extracting this from git until we have a way to plumb
# through revision numbers.
nixery-commit-hash = "depot";

# Go implementation of the Nixery server which implements the
# container registry interface.
Expand Down

0 comments on commit 2bfbfa9

Please sign in to comment.