File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,17 @@ install_scala() {
112
112
# the environment
113
113
ZINC_PORT=${ZINC_PORT:- " 3030" }
114
114
115
+ # Check for the `--force` flag dictating that `mvn` should be downloaded
116
+ # regardless of whether the system already has a `mvn` install
117
+ if [ " $1 " == " --force" ]; then
118
+ FORCE_MVN=1
119
+ shift
120
+ fi
121
+
115
122
# Install Maven if necessary
116
123
MVN_BIN=" $( command -v mvn) "
117
124
118
- if [ ! " $MVN_BIN " ]; then
125
+ if [ ! " $MVN_BIN " -o -n " $FORCE_MVN " ]; then
119
126
install_mvn
120
127
fi
121
128
139
146
# Set any `mvn` options if not already present
140
147
export MAVEN_OPTS=${MAVEN_OPTS:- " $_COMPILE_JVM_OPTS " }
141
148
149
+ echo " Using \` mvn\` from path: $MVN_BIN "
150
+
142
151
# Last, call the `mvn` command as usual
143
152
${MVN_BIN} " $@ "
You can’t perform that action at this time.
0 commit comments