mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Make docker script work when CDPATH is set
Since #3914 we convert empty CDPATH entries to ".", which makes them easier to use in fish scripts. This has backfired here, because bash's cd prints the directory if the "." entry from CDPATH is used. From bash(1) on cd: > If a non-empty directory name from CDPATH is used, or if - is > the first argument, and the directory change is successful, the > absolute pathname of the new working directory is written to the > standard output. My preferred fix would be to convince bash to amend "non-empty directory" to "non-empty directory other than .".
This commit is contained in:
parent
b3c520cc47
commit
d96a2e7052
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ DOCKER_EXTRA_ARGS=""
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Get fish source directory.
|
# Get fish source directory.
|
||||||
FISH_SRC_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd)
|
FISH_SRC_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )"/.. >/dev/null && pwd)
|
||||||
|
|
||||||
# Parse args.
|
# Parse args.
|
||||||
while [ $# -gt 1 ]; do
|
while [ $# -gt 1 ]; do
|
||||||
|
|
Loading…
Reference in a new issue