Skip to content

Commit

Permalink
reverting...
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Jan 12, 2025
1 parent fbfdc39 commit 7e6d6ca
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
12 changes: 12 additions & 0 deletions dist/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ object `package` extends RootModule with InstallModule {
| JAVACMD="$$JAVA_HOME/bin/java"
|fi
|
|# Client-server mode doesn't seem to work on WSL, just disable it for now
|# https://stackoverflow.com/a/43618657/871202
|if grep -qEi "(Microsoft|WSL)" /proc/version > /dev/null 2> /dev/null ; then
| if [ -z $$COURSIER_CACHE ] ; then
| COURSIER_CACHE=.coursier
| fi
|fi
|exec "$$JAVACMD" $jvmArgsStr $$JAVA_OPTS -cp "$classpathStr" $millMainClass "$$@"
|""".stripMargin
},
Expand All @@ -240,6 +247,11 @@ object `package` extends RootModule with InstallModule {
s"""setlocal EnableDelayedExpansion
|set "JAVACMD=java.exe"
|if not "%JAVA_HOME%"=="" set "JAVACMD=%JAVA_HOME%\\bin\\java.exe"
|if "%1" == "-i" set _I_=true
|if "%1" == "--interactive" set _I_=true
|if "%1" == "--repl" set _I_=true
|if "%1" == "--no-server" set _I_=true
|if "%1" == "--bsp" set _I_=true
|
|"%JAVACMD%" $jvmArgsStr %JAVA_OPTS% -cp "$classpathStr" $millMainClass %*
|
Expand Down
3 changes: 2 additions & 1 deletion mill
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fi

MILL_NATIVE_SUFFIX="-native"
FULL_MILL_VERSION=$MILL_VERSION
ARTIFACT_SUFFIX=""

case "$MILL_VERSION" in
*"$MILL_NATIVE_SUFFIX")
MILL_VERSION=${MILL_VERSION%"$MILL_NATIVE_SUFFIX"}
Expand All @@ -117,6 +117,7 @@ case "$MILL_VERSION" in
fi
esac


MILL="${MILL_DOWNLOAD_PATH}/${FULL_MILL_VERSION}"

try_to_use_system_mill() {
Expand Down
1 change: 0 additions & 1 deletion mill.bat
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ rem without bat file extension, cmd doesn't seem to be able to run it
set "MILL_NATIVE_SUFFIX=-native"
set "FULL_MILL_VERSION=%MILL_VERSION%"
set "MILL_EXT=.bat"
set "ARTIFACT_SUFFIX="
REM Check if MILL_VERSION contains MILL_NATIVE_SUFFIX
echo %MILL_VERSION% | findstr /C:"%MILL_NATIVE_SUFFIX%" >nul
if %errorlevel% equ 0 (
Expand Down
3 changes: 1 addition & 2 deletions testkit/src/mill/testkit/ExampleTester.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ class ExampleTester(
stderr = os.Pipe,
cwd = workspacePath,
mergeErrIntoOut = true,
env =
Map(MILL_TEST_SUITE -> this.getClass().toString(), "JAVA_HOME" -> sys.props("java.home")),
env = Map(MILL_TEST_SUITE -> this.getClass().toString()),
check = false
)

Expand Down
3 changes: 1 addition & 2 deletions testkit/src/mill/testkit/IntegrationTester.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ object IntegrationTester {
val debugArgs = Option.when(debugLog)("--debug")

val shellable: os.Shellable = (millExecutable, serverArgs, "--disable-ticker", debugArgs, cmd)

val res0 = os.call(
cmd = shellable,
env = env ++ Seq("JAVA_HOME" -> sys.props("java.home")),
env = env,
cwd = cwd,
stdin = stdin,
stdout = stdout,
Expand Down

0 comments on commit 7e6d6ca

Please sign in to comment.