aboutsummaryrefslogtreecommitdiff
path: root/toys/toysh.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/toysh.c')
-rw-r--r--toys/toysh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/toysh.c b/toys/toysh.c
index 17467fad..d1ef683f 100644
--- a/toys/toysh.c
+++ b/toys/toysh.c
@@ -349,7 +349,7 @@ static void handle(char *command)
void cd_main(void)
{
char *dest = *toys.optargs ? *toys.optargs : getenv("HOME");
- if (chdir(dest)) error_exit("chdir %s",dest);
+ xchdir(dest);
}
void exit_main(void)