Print a warning when loading a large path into memory
I.e. if you have a derivation with src = ./huge-directory; you'll get a warning that this is not a good idea.
This commit is contained in:
parent
3c6b8a5215
commit
829af22759
3 changed files with 33 additions and 4 deletions
|
|
@ -402,7 +402,10 @@ Path RemoteStore::addToStore(const Path & _srcPath,
|
|||
writeInt((hashAlgo == htSHA256 && recursive) ? 0 : 1, to);
|
||||
writeInt(recursive ? 1 : 0, to);
|
||||
writeString(printHashType(hashAlgo), to);
|
||||
to.written = 0;
|
||||
to.warn = true;
|
||||
dumpPath(srcPath, to, filter);
|
||||
to.warn = false;
|
||||
processStderr();
|
||||
return readStorePath(from);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue