fix: print a message to stderr if setlocale fails
This commit is contained in:
parent
ea70d45363
commit
75b1c85723
1 changed files with 2 additions and 1 deletions
|
@ -104,7 +104,8 @@ pub fn main() anyerror!void {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.setlocale(c.LC_ALL, "") == null) {
|
if (c.setlocale(c.LC_ALL, "") == null) {
|
||||||
return error.SetLocaleFailed;
|
try std.io.getStdErr().writer().print("Failed to set locale. Is your locale valid?\n", .{});
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.args.@"debug-dump-on-error" != 0)
|
if (res.args.@"debug-dump-on-error" != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue