Skip to content

Commit

Permalink
tests/flakes: check git+file:./${submodule} protocol
Browse files Browse the repository at this point in the history
Relative, local git repo used to work (for submodules), but it
fails after 3e0129c.

This commit adds a test to prevent such failure in the future.
  • Loading branch information
bryango committed Dec 27, 2024
1 parent e971a3b commit af68774
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/functional/flakes/flakes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir#default"
nix build -o "$TEST_ROOT/result" "$flake1Dir?ref=HEAD#default"
nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir?ref=HEAD#default"

# Check that relative path spec is allowed for git flake.
(
cd "$flake1Dir/.."
nix build -o "$TEST_ROOT/result" "git+file:./$(basename "$flake1Dir")"
)

# Check that store symlinks inside a flake are not interpreted as flakes.
nix build -o "$flake1Dir/result" "git+file://$flake1Dir"
nix path-info "$flake1Dir/result"
Expand Down

0 comments on commit af68774

Please sign in to comment.