Skip to content

Commit 0b8f4ea

Browse files
committed
unset CDPATH in bin/dotc to make ( cd && pwd ) work correctly
When CDPATH is set, cd echoes the directory that it is switching to. The ( cd && pwd ) pattern then prints the directory twice, causing a mangled path. See https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
1 parent b253252 commit 0b8f4ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/dotc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ programName=$(basename "$0")
1717

1818

1919
declare -a java_args scala_args residual_args
20-
unset verbose quiet cygwin toolcp colors saved_stty
20+
unset verbose quiet cygwin toolcp colors saved_stty CDPATH
2121

2222

2323
CompilerMain=dotty.tools.dotc.Main

0 commit comments

Comments
 (0)