aboutsummaryrefslogtreecommitdiff
path: root/src/nix/path-info.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-24 14:21:36 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-24 14:21:36 +0200
commit66577a1c64ac5d9f07aa2c207c96e13077576a4e (patch)
treea4c55d9b74df73cefe28eb2f26cdb6968f250e06 /src/nix/path-info.cc
parent9b63bb88c8873d192b8b01608e5d230817dd3375 (diff)
Factor out --json
Diffstat (limited to 'src/nix/path-info.cc')
-rw-r--r--src/nix/path-info.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc
index 0f9a1125f..30b193798 100644
--- a/src/nix/path-info.cc
+++ b/src/nix/path-info.cc
@@ -2,25 +2,24 @@
#include "shared.hh"
#include "store-api.hh"
#include "json.hh"
+#include "common-args.hh"
#include <iomanip>
#include <algorithm>
using namespace nix;
-struct CmdPathInfo : StorePathsCommand
+struct CmdPathInfo : StorePathsCommand, MixJSON
{
bool showSize = false;
bool showClosureSize = false;
bool showSigs = false;
- bool json = false;
CmdPathInfo()
{
mkFlag('s', "size", "print size of the NAR dump of each path", &showSize);
mkFlag('S', "closure-size", "print sum size of the NAR dumps of the closure of each path", &showClosureSize);
mkFlag(0, "sigs", "show signatures", &showSigs);
- mkFlag(0, "json", "produce JSON output", &json);
}
std::string name() override