aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 821124324..7b56de7e4 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -640,10 +640,14 @@ static void opRestore(Strings opFlags, Strings opArgs)
static void opExport(Strings opFlags, Strings opArgs)
{
- if (!opFlags.empty()) throw UsageError("unknown flag");
-
+ bool sign = false;
+ for (Strings::iterator i = opFlags.begin();
+ i != opFlags.end(); ++i)
+ if (*i == "--sign") sign = true;
+ else throw UsageError(format("unknown flag `%1%'") % *i);
+
FdSink sink(STDOUT_FILENO);
- store->exportPath(*opArgs.begin(), false, sink);
+ store->exportPath(*opArgs.begin(), sign, sink);
}