Skip to content

Commit 3c10909

Browse files
committed
Use 'nix flake prefetch' to get the store path of a flake
Future-proofing for when 'nix flake metadata' won't return a store path anymore.
1 parent 5c6785e commit 3c10909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/functional/flakes/flake-in-submodule.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ EOF
7474
git -C "$rootRepo" add flake.nix
7575
git -C "$rootRepo" commit -m "Add flake.nix"
7676

77-
storePath=$(nix flake metadata --json "$rootRepo?submodules=1" | jq -r .path)
77+
storePath=$(nix flake prefetch --json "$rootRepo?submodules=1" | jq -r .storePath)
7878
[[ -e "$storePath/submodule" ]]
7979

8080
# The root repo may use the submodule repo as an input

0 commit comments

Comments
 (0)