diff options
Diffstat (limited to 'src/nix.cc')
-rw-r--r-- | src/nix.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/nix.cc b/src/nix.cc index bd356581096f..9b21f0379cc5 100644 --- a/src/nix.cc +++ b/src/nix.cc @@ -112,8 +112,20 @@ static void opEvaluate(Strings opFlags, Strings opArgs) static void opDelete(Strings opFlags, Strings opArgs) { getArgType(opFlags); + if (!opFlags.empty()) throw UsageError("unknown flag"); - cerr << "delete!\n"; + for (Strings::iterator it = opArgs.begin(); + it != opArgs.end(); it++) + { + Hash hash; + if (argType == atpHash) + hash = parseHash(*it); + else if (argType == atpName) + throw Error("not implemented"); + else + throw Error("invalid argument type"); + deleteValue(hash); + } } |