mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
cephfs-shell: cd with no args shouldn't print an error message
Instead the current working directory should change to root when no argument is passed to cd. Fixes: http://tracker.ceph.com/issues/40476 Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit is contained in:
parent
a29700e5e7
commit
6e3f5c4412
@ -896,7 +896,8 @@ sub-directories, files')
|
||||
return self.complete_filenames(text, line, begidx, endidx)
|
||||
|
||||
cd_parser = argparse.ArgumentParser(description='Change working directory')
|
||||
cd_parser.add_argument('path', type=str, help='Name of the directory.', default='/')
|
||||
cd_parser.add_argument('path', type=str, help='Name of the directory.',
|
||||
nargs='?', default='/')
|
||||
|
||||
@with_argparser(cd_parser)
|
||||
def do_cd(self, args):
|
||||
|
Loading…
Reference in New Issue
Block a user