mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
Add an error message when cd fails with ELOOP
This error is emitted if you try to `cd` into a symlink loop or very long chain.
This commit is contained in:
parent
706f56867c
commit
ba7c84fe3b
1 changed files with 3 additions and 0 deletions
|
@ -110,6 +110,9 @@ maybe_t<int> builtin_cd(parser_t &parser, io_streams_t &streams, const wchar_t *
|
||||||
} else if (!broken_symlink.empty()) {
|
} else if (!broken_symlink.empty()) {
|
||||||
streams.err.append_format(_(L"%ls: '%ls' is a broken symbolic link to '%ls'\n"), cmd,
|
streams.err.append_format(_(L"%ls: '%ls' is a broken symbolic link to '%ls'\n"), cmd,
|
||||||
broken_symlink.c_str(), broken_symlink_target.c_str());
|
broken_symlink.c_str(), broken_symlink_target.c_str());
|
||||||
|
} else if (best_errno == ELOOP) {
|
||||||
|
streams.err.append_format(_(L"%ls: Too many levels of symbolic links: '%ls'\n"), cmd,
|
||||||
|
dir_in.c_str());
|
||||||
} else if (best_errno == ENOENT) {
|
} else if (best_errno == ENOENT) {
|
||||||
streams.err.append_format(_(L"%ls: The directory '%ls' does not exist\n"), cmd,
|
streams.err.append_format(_(L"%ls: The directory '%ls' does not exist\n"), cmd,
|
||||||
dir_in.c_str());
|
dir_in.c_str());
|
||||||
|
|
Loading…
Reference in a new issue