Skip to content

Commit ef9a438

Browse files
committed
melting-pot.sh: do not use symlinking on Windows
The `ln -s` feature does not work in MINGW; instead it copies. And that cannot work as written because it's copying a folder into a subfolder of itself, resulting in an infinite loop. May be a bug in MINGW's ln command, but let's avoid the issue.
1 parent 756eb8e commit ef9a438

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

melting-pot.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,18 @@ meltDown() {
773773
# Use local directory for the specified project.
774774
test -d "$1" || die "No such directory: $1" 11
775775
test -f "$1/pom.xml" || die "Not a Maven project: $1" 12
776-
info "Local Maven project: $1"
777-
mkdir -p "LOCAL"
778-
local projectDir="LOCAL/PROJECT"
779-
ln -s "$1" "$projectDir"
776+
case "$(uname)" in
777+
MINGW*)
778+
warn "Skipping inclusion of local project due to lack of symlink support."
779+
local projectDir="$1"
780+
;;
781+
*)
782+
info "Local Maven project: $1"
783+
mkdir -p "LOCAL"
784+
local projectDir="LOCAL/PROJECT"
785+
ln -s "$1" "$projectDir"
786+
;;
787+
esac
780788
else
781789
# Treat specified project as a GAV.
782790
info "Fetching project source"

0 commit comments

Comments
 (0)