mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
error on trying to cd to directory without executable bit
This commit is contained in:
parent
6e98119c46
commit
2b6e260968
1 changed files with 2 additions and 0 deletions
|
@ -88,6 +88,8 @@ def cd(args, stdin=None):
|
|||
return '', 'cd: no such file or directory: {0}\n'.format(d)
|
||||
if not os.path.isdir(d):
|
||||
return '', 'cd: {0} is not a directory\n'.format(d)
|
||||
if not os.access(d, os.X_OK):
|
||||
return '', 'cd: permission denied: {0}\n'.format(d)
|
||||
# now, push the directory onto the dirstack if AUTO_PUSHD is set
|
||||
if cwd is not None and env.get('AUTO_PUSHD'):
|
||||
pushd(['-n', '-q', cwd])
|
||||
|
|
Loading…
Add table
Reference in a new issue