mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
Merge pull request #11718 from xokdvium/dev/move-create-directory-out-of-assert
fix(nix/eval.cc): move call to `fs::create_directory` out of `assert`
This commit is contained in:
commit
b93b910fec
@ -89,8 +89,9 @@ struct CmdEval : MixJSON, InstallableValueCommand, MixReadOnlyOption
|
||||
// FIXME: disallow strings with contexts?
|
||||
writeFile(path.string(), v.string_view());
|
||||
else if (v.type() == nAttrs) {
|
||||
[[maybe_unused]] bool directoryCreated = fs::create_directory(path);
|
||||
// Directory should not already exist
|
||||
assert(fs::create_directory(path.string()));
|
||||
assert(directoryCreated);
|
||||
for (auto & attr : *v.attrs()) {
|
||||
std::string_view name = state->symbols[attr.name];
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user