1
0
Fork 0
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:
Andy Hamon 2025-01-16 11:53:43 -08:00 committed by GitHub
parent 3716ded8df
commit 6ea339ce8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -588,7 +588,9 @@ static void opInstall(Globals & globals, Strings opFlags, Strings opArgs)
else if (arg == "--priority") {
if (i == opFlags.end())
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);
}