diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 295383681..dafd1ae7e 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -645,7 +645,7 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun { auto flake = lockFlake(); - auto jsonRoot = json ? std::optional(std::cout) : std::optional(); + auto jsonRoot = json ? std::optional(std::cout) : std::nullopt; StorePathSet sources;