mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Don't say "copying X to the store" in read-only mode
This commit is contained in:
parent
06be819b89
commit
6162105675
1 changed files with 5 additions and 2 deletions
|
@ -33,12 +33,15 @@ StorePath fetchToStore(
|
|||
} else
|
||||
debug("source path '%s' is uncacheable", path);
|
||||
|
||||
Activity act(*logger, lvlChatty, actUnknown, fmt("copying '%s' to the store", path));
|
||||
auto readOnly = settings.readOnlyMode;
|
||||
|
||||
Activity act(*logger, lvlChatty, actUnknown,
|
||||
fmt(readOnly ? "hashing '%s'" : "copying '%s' to the store", path));
|
||||
|
||||
auto filter2 = filter ? *filter : defaultPathFilter;
|
||||
|
||||
auto storePath =
|
||||
settings.readOnlyMode
|
||||
readOnly
|
||||
? store.computeStorePath(
|
||||
name, *path.accessor, path.path, method, HashAlgorithm::SHA256, {}, filter2).first
|
||||
: store.addToStore(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue