aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-28 14:11:19 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-05-28 14:11:19 +0200
commit444786e6d39209d3f0c222af0fbc80846ac7337d (patch)
tree689653c0dd70a3070b2a0a96461cfe0f911527b0
parent46294d60cd46564ea6b40cf9c32759021f9d1fc9 (diff)
nix flake info: Add missing newline
-rw-r--r--src/nix/flake.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 0fea1993c..d8c422d3d 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -72,14 +72,14 @@ struct CmdFlakeList : EvalCommand
static void printSourceInfo(const SourceInfo & sourceInfo)
{
- std::cout << "URI: " << sourceInfo.resolvedRef.to_string() << "\n";
+ std::cout << fmt("URI: %s\n", sourceInfo.resolvedRef.to_string());
if (sourceInfo.resolvedRef.ref)
- std::cout << "Branch: " << *sourceInfo.resolvedRef.ref;
+ std::cout << fmt("Branch: %s\n",*sourceInfo.resolvedRef.ref);
if (sourceInfo.resolvedRef.rev)
- std::cout << "Revision: " << sourceInfo.resolvedRef.rev->to_string(Base16, false) << "\n";
+ std::cout << fmt("Revision: %s\n", sourceInfo.resolvedRef.rev->to_string(Base16, false));
if (sourceInfo.revCount)
- std::cout << "Revcount: " << *sourceInfo.revCount << "\n";
- std::cout << "Path: " << sourceInfo.storePath << "\n";
+ std::cout << fmt("Revcount: %s\n", *sourceInfo.revCount);
+ std::cout << fmt("Path: %s\n", sourceInfo.storePath);
}
static void sourceInfoToJson(const SourceInfo & sourceInfo, nlohmann::json & j)
@@ -96,9 +96,9 @@ static void sourceInfoToJson(const SourceInfo & sourceInfo, nlohmann::json & j)
static void printFlakeInfo(const Flake & flake)
{
- std::cout << "ID: " << flake.id << "\n";
- std::cout << "Description: " << flake.description << "\n";
- std::cout << "Epoch: " << flake.epoch << "\n";
+ std::cout << fmt("ID: %s\n", flake.id);
+ std::cout << fmt("Description: %s\n", flake.description);
+ std::cout << fmt("Epoch: %s\n", flake.epoch);
printSourceInfo(flake.sourceInfo);
}
@@ -114,7 +114,7 @@ static nlohmann::json flakeToJson(const Flake & flake)
static void printNonFlakeInfo(const NonFlake & nonFlake)
{
- std::cout << "ID: " << nonFlake.alias << "\n";
+ std::cout << fmt("ID: %s\n", nonFlake.alias);
printSourceInfo(nonFlake.sourceInfo);
}