1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-09 03:43:54 +02:00

Merge pull request #10043 from edolstra/fix-readonly-fetchToStore

fetchToStore(): Don't always respect settings.readOnlyMode
This commit is contained in:
Théophane Hufschmitt 2024-02-20 12:07:48 +01:00 committed by GitHub
commit 6f4bb1b584
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 30 additions and 8 deletions

View file

@ -30,7 +30,10 @@ echo hello >> $TEST_ROOT/worktree/hello
rev2=$(git -C $repo rev-parse HEAD)
git -C $repo tag -a tag2 -m tag2
# Fetch a worktree
# Check whether fetching in read-only mode works.
nix-instantiate --eval -E "builtins.readFile ((builtins.fetchGit file://$TEST_ROOT/worktree) + \"/hello\") == \"utrecht\\n\""
# Fetch a worktree.
unset _NIX_FORCE_HTTP
path0=$(nix eval --impure --raw --expr "(builtins.fetchGit file://$TEST_ROOT/worktree).outPath")
path0_=$(nix eval --impure --raw --expr "(builtins.fetchTree { type = \"git\"; url = file://$TEST_ROOT/worktree; }).outPath")