fix processenvironment

master
Josha von Gizycki 3 weeks ago
parent fb0cdb12ae
commit 13e24e923f

@ -19,11 +19,14 @@ class ProcessEnvironment {
useEnv: MutableMap<String, String> = System.getenv()
) =
useEnv.let { env ->
env.filter { it.key.contains("ALFRED") }.forEach { env.remove(it.key) }
env.putAll(config.env)
env["ALFRED_LOG_FILE"] = logFile.backingFile.absolutePath
env["ALFRED_REV"] = rev ?: ""
env
val newEnv = mutableMapOf<String, String>()
newEnv.putAll(env)
newEnv.filter { it.key.contains("ALFRED") }.forEach { env.remove(it.key) }
newEnv.putAll(config.env)
newEnv["ALFRED_LOG_FILE"] = logFile.backingFile.absolutePath
newEnv["ALFRED_REV"] = rev ?: ""
newEnv
}
}

@ -2,7 +2,6 @@ package alfred.web.system
import alfred.web.core.build.BuildConfig
import alfred.web.core.build.LogFile
import alfred.web.system.ProcessEnvironment
import org.junit.jupiter.api.Test
import java.nio.file.Files
import kotlin.test.assertEquals

Loading…
Cancel
Save