From 21d9928c6c5a16fa63834323b5f8954369f60b65 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 4 Jun 2020 14:45:59 -0500 Subject: [PATCH] Add test for submodules in git --- tests/git.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/git.sh b/tests/git.sh index a09ee85d7e2..bdc98844a0d 100644 --- a/tests/git.sh +++ b/tests/git.sh @@ -61,6 +61,9 @@ if [[ -n $(type -p git) ]]; then # Fetch the default branch. path=$(nix eval --raw "(builtins.fetchTree { type = \"git\"; url = file://$repo; treeHash = \"$treeHash\"; }).outPath") [[ $(cat $path/hello) = world ]] + + # Submodules cause error. + (! nix eval --raw "(builtins.fetchTree { type = \"git\"; url = file://$repo; treeHash = \"$treeHash\"; submodules = true; }).outPath") else echo "Git not installed; skipping Git tests" fi