aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index fdb47497..6321ad13 100644
--- a/main.c
+++ b/main.c
@@ -66,6 +66,8 @@ static void toy_singleinit(struct toy_list *which, char *argv[])
toys.which = which;
toys.argv = argv;
+ if (CFG_TOYBOX_I18N && (which->flags & TOYFLAG_LOCALE)) setlocale(LC_ALL, "");
+
if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) {
if (toys.which == toy_list && toys.argv[2])
if (!(toys.which = toy_find(toys.argv[2]))) return;
@@ -166,8 +168,6 @@ list:
int main(int argc, char *argv[])
{
- if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "");
-
if (CFG_TOYBOX) {
// Trim path off of command name
*argv = basename(*argv);