Update src/nix/flake.cc

https://github.com/NixOS/nix/pull/6699#discussion_r904097147

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
This commit is contained in:
Manuel 2022-06-26 18:00:57 +01:00 committed by GitHub
parent 117baee1b7
commit 58cbbdc5e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -774,7 +774,7 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
auto target = readLink(from2); auto target = readLink(from2);
if (pathExists(to2)) { if (pathExists(to2)) {
if (readLink(to2) != target) { if (readLink(to2) != target) {
printError("refusing to overwrite existing file '%s' - please merge manually with '%s'", to2, from2); printError("refusing to overwrite existing file '%s'\n please merge it manually with '%s'", to2, from2);
success = false; success = false;
conflictedFiles.push_back(to2); conflictedFiles.push_back(to2);
} else { } else {