PR feedback

This commit is contained in:
HannahPadd
2026-03-16 18:02:38 +01:00
parent be722624f1
commit a83c7ff31e
3 changed files with 14 additions and 14 deletions

View File

@@ -386,8 +386,8 @@ const spawnServer = async () => {
logger.info({ javaBin, serverJar }, 'Found Java and server jar');
const serverArgs = ['-Xmx128M', '-jar', serverJar]
if (options.steam) serverArgs.push(`--steam=${options.steam}`)
if (options.install) serverArgs.push(`--install=${options.install}`)
if (options.steam) serverArgs.push(`--steam`)
if (options.install) serverArgs.push(`--install`)
if (options.noUdev) serverArgs.push(`--no-udev`)
serverArgs.push('run')

View File

@@ -1,5 +1,6 @@
package io.eiren.util
import dev.slimevr.SLIMEVR_IDENTIFIER
import java.io.File
import java.nio.file.Path
import java.util.*
@@ -35,20 +36,19 @@ enum class OperatingSystem(
val socketDirectory: String
get() {
val dir = System.getenv("SLIMEVR_SOCKET_DIR")
var dir = System.getenv("SLIMEVR_SOCKET_DIR")
if (dir != null) return dir
if (currentPlatform == LINUX) {
val isPressureVessel = System.getenv("PRESSURE_VESSEL_RUNTIME")?.isNotEmpty()
if (isPressureVessel == true) {
System.getenv("HOME")?.let { Path(it, ".local", "share", "dev.slimevr.SlimeVR") }
} else {
val runtimeDir = System.getenv("XDG_RUNTIME_DIR")
return if (!runtimeDir.isNullOrBlank()) {
runtimeDir
} else {
System.getProperty("java.io.tmpdir")
}
val isPressureVessel = System.getenv("PRESSURE_VESSEL_RUNTIME")?.isNotEmpty() == true
if (isPressureVessel) {
dir = System.getenv("XDG_CONFIG_HOME")?.let { Path(it, SLIMEVR_IDENTIFIER
).toString() }
?: System.getenv("HOME")?.let { Path(it, ".local", "share", SLIMEVR_IDENTIFIER).toString() }
if (dir != null) return dir
}
dir = System.getenv("XDG_RUNTIME_DIR")
if (dir != null) return dir
}
return System.getProperty("java.io.tmpdir")
}

View File

@@ -54,7 +54,7 @@ fun main(args: Array<String>) {
val parser: CommandLineParser = DefaultParser()
val formatter = HelpFormatter()
val options = Options()
val isLinux = System.getProperty("os.name").lowercase().contains("linux")
val isLinux = OperatingSystem.currentPlatform == OperatingSystem.LINUX
options.addOption("h", "help", false, "Show help")
options.addOption("V", "version", false, "Show version")
options.addOption("i", "install", true, "Run the driver install")