1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Merge pull request #11438 from zimbatm/nix-fmt-pwd

fix(nix fmt): remove the default "." argument
This commit is contained in:
tomberek 2024-09-10 23:44:16 -04:00 committed by GitHub
commit c60e1be62c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 13 deletions

View file

@ -40,14 +40,8 @@ struct CmdFmt : SourceExprCommand {
Strings programArgs{app.program};
// Propagate arguments from the CLI
if (args.empty()) {
// Format the current flake out of the box
programArgs.push_back(".");
} else {
// User wants more power, let them decide which paths to include/exclude
for (auto &i : args) {
programArgs.push_back(i);
}
for (auto &i : args) {
programArgs.push_back(i);
}
// Release our references to eval caches to ensure they are persisted to disk, because