mirror of
https://github.com/NixOS/nix
synced 2024-09-19 23:03:53 -04:00
Don't say "copying X to the store" in read-only mode
(cherry picked from commit 6162105675
)
This commit is contained in:
parent
ce23ef4a77
commit
7f02d17881
|
@ -47,12 +47,15 @@ StorePath fetchToStore(
|
||||||
} else
|
} else
|
||||||
debug("source path '%s' is uncacheable", path);
|
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 filter2 = filter ? *filter : defaultPathFilter;
|
||||||
|
|
||||||
auto storePath =
|
auto storePath =
|
||||||
settings.readOnlyMode
|
readOnly
|
||||||
? store.computeStorePath(
|
? store.computeStorePath(
|
||||||
name, *path.accessor, path.path, method, HashAlgorithm::SHA256, {}, filter2).first
|
name, *path.accessor, path.path, method, HashAlgorithm::SHA256, {}, filter2).first
|
||||||
: store.addToStore(
|
: store.addToStore(
|
||||||
|
|
Loading…
Reference in a new issue