diff --git a/lib/scala/runtime-version-manager/src/main/scala/org/enso/runtimeversionmanager/runner/JVMSettings.scala b/lib/scala/runtime-version-manager/src/main/scala/org/enso/runtimeversionmanager/runner/JVMSettings.scala index b6ee7cc5add..02b77e1dcc1 100644 --- a/lib/scala/runtime-version-manager/src/main/scala/org/enso/runtimeversionmanager/runner/JVMSettings.scala +++ b/lib/scala/runtime-version-manager/src/main/scala/org/enso/runtimeversionmanager/runner/JVMSettings.scala @@ -59,7 +59,9 @@ object JVMSettings { private def jvmOptionIfSet(name: String): Option[(String, String)] = { val propertyValue = System.getProperty(name) - Option(propertyValue).map((name, _)) + if (propertyValue != null && !propertyValue.isEmpty) + Some((name, propertyValue)) + else None } }