Always return absolute path in path_get_cdpath

Fixes #6220
This commit is contained in:
Johannes Altmanninger
2019-10-17 21:15:43 +02:00
parent 868eba5e80
commit 5e274066e3
4 changed files with 21 additions and 7 deletions

13
tests/checks/cd.fish Normal file
View File

@@ -0,0 +1,13 @@
# RUN: %fish %s
set -l tmp (mktemp -d)
cd $tmp
# resolve CDPATH (issue 6220)
begin
mkdir -p x
# CHECK: /{{.*}}/x
cd x; pwd
# CHECK: /{{.*}}/x
set -lx CDPATH ..; cd x; pwd
end
rm -rf $tmp