mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Update src/nix-env/nix-env.cc
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
3716ded8df
commit
6ea339ce8a
1 changed files with 3 additions and 1 deletions
|
@ -588,7 +588,9 @@ static void opInstall(Globals & globals, Strings opFlags, Strings opArgs)
|
||||||
else if (arg == "--priority") {
|
else if (arg == "--priority") {
|
||||||
if (i == opFlags.end())
|
if (i == opFlags.end())
|
||||||
throw UsageError("'%1%' requires an argument", arg);
|
throw UsageError("'%1%' requires an argument", arg);
|
||||||
priority = std::stoi(*i++);
|
priority = string2Int<int>(*i++);
|
||||||
|
if (!priority)
|
||||||
|
throw UsageError("'--priority' requires an integer argument");
|
||||||
}
|
}
|
||||||
else throw UsageError("unknown flag '%1%'", arg);
|
else throw UsageError("unknown flag '%1%'", arg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue