mirror of https://github.com/sbt/sbt.git
Fix for realpathish /root returning //root.
This commit is contained in:
parent
a199875e1d
commit
41c4bdfef1
11
sbt
11
sbt
|
|
@ -46,11 +46,18 @@ realpathish () {
|
|||
COUNT=$(($COUNT + 1))
|
||||
done
|
||||
|
||||
TARGET_DIR="$(pwd -P)"
|
||||
if [ "$TARGET_DIR" == "/" ]; then
|
||||
TARGET_FILE="/$TARGET_FILE"
|
||||
else
|
||||
TARGET_FILE="$TARGET_DIR/$TARGET_FILE"
|
||||
fi
|
||||
|
||||
# make sure we grab the actual windows path, instead of cygwin's path.
|
||||
if [[ "x$FIX_CYGPATH" != "x" ]]; then
|
||||
echo "$(cygwinpath "$(pwd -P)/$TARGET_FILE")"
|
||||
echo "$(cygwinpath "$TARGET_FILE")"
|
||||
else
|
||||
echo "$(pwd -P)/$TARGET_FILE"
|
||||
echo "$TARGET_FILE"
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue