Stop cd "" from crashing

Fixes #8147.
This commit is contained in:
Fabian Homborg
2021-07-17 19:00:35 +02:00
parent b0981ef6db
commit e9a793532e
2 changed files with 19 additions and 0 deletions

View File

@@ -218,3 +218,13 @@ __fish_test_thrash_cd |
__fish_test_thrash_cd |
__fish_test_thrash_cd |
__fish_test_thrash_cd
cd ""
# CHECKERR: cd: Empty directory '' does not exist
# CHECKERR: {{.*}}/cd.fish (line {{\d+}}):
# CHECKERR: builtin cd $argv
# CHECKERR: ^
# CHECKERR: in function 'cd' with arguments '""'
# CHECKERR: called on line {{\d+}} of file {{.*}}/cd.fish
echo $status
# CHECK: 1