diff options
Diffstat (limited to 'third_party/nix/src/libutil/args.hh')
-rw-r--r-- | third_party/nix/src/libutil/args.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/nix/src/libutil/args.hh b/third_party/nix/src/libutil/args.hh index 20a6379fecba..2c352a04368c 100644 --- a/third_party/nix/src/libutil/args.hh +++ b/third_party/nix/src/libutil/args.hh @@ -4,6 +4,8 @@ #include <map> #include <memory> +#include <absl/strings/numbers.h> + #include "util.hh" namespace nix { @@ -179,7 +181,7 @@ class Args { .arity(1) .handler([=](std::vector<std::string> ss) { I n; - if (!string2Int(ss[0], n)) + if (!absl::SimpleAtoi(ss[0], &n)) throw UsageError("flag '--%s' requires a integer argument", longName); fun(n); |