diff options
author | axel <axel@liljencrantz.se> | 2006-02-04 21:36:50 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-04 21:36:50 +1000 |
commit | 1401c44a79a9666cf408ca96d9f4111fd9bcf72e (patch) | |
tree | 97fe1037694d29add168e02cb2db5e93a1b43fe8 /builtin.c | |
parent | 40ea5987b20d86634c4c6b5f170798759ec0ea66 (diff) |
Don't print full stack trace for failiures in cd in interactive mode
darcs-hash:20060204113650-ac50b-465dd4b3fb27e8d90127231cccdae29ac7b8fd20.gz
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -1955,9 +1955,11 @@ static int builtin_cd( wchar_t **argv ) _( L"%ls: '%ls' is not a directory or you do not have permission to enter it\n" ), argv[0], dir_in ); - sb_append2( sb_err, - parser_current_line(), - (void *)0 ); + if( !is_interactive ) + sb_append2( sb_err, + parser_current_line(), + (void *)0 ); + return 1; } @@ -1967,10 +1969,11 @@ static int builtin_cd( wchar_t **argv ) _( L"%ls: '%ls' is not a directory\n" ), argv[0], dir ); - sb_append2( sb_err, - parser_current_line(), - (void *)0 ); - + if( !is_interactive ) + sb_append2( sb_err, + parser_current_line(), + (void *)0 ); + free( dir ); return 1; |