Don't print full stack trace for failiures in cd in interactive mode

darcs-hash:20060204113650-ac50b-465dd4b3fb27e8d90127231cccdae29ac7b8fd20.gz
This commit is contained in:
axel 2006-02-04 21:36:50 +10:00
parent 40ea5987b2
commit 1401c44a79

View file

@ -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;