mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-22 01:30:41 +08:00
Fix readStringListFromEnv when no env specified
This commit is contained in:
parent
9d18d79d66
commit
0da75d31b9
@ -15,10 +15,10 @@ import org.objectweb.asm.ClassWriter
|
|||||||
import org.objectweb.asm.Opcodes
|
import org.objectweb.asm.Opcodes
|
||||||
import org.objectweb.asm.tree.ClassNode
|
import org.objectweb.asm.tree.ClassNode
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.UUID
|
import java.util.*
|
||||||
|
|
||||||
internal fun readStringListFromEnv(key: String): MutableList<String> {
|
internal fun readStringListFromEnv(key: String): MutableList<String> {
|
||||||
val size = System.getenv(key)!!.toInt()
|
val size = System.getenv(key)?.toInt() ?: 0
|
||||||
val rsp = mutableListOf<String>()
|
val rsp = mutableListOf<String>()
|
||||||
for (i in 0 until size) {
|
for (i in 0 until size) {
|
||||||
rsp.add(System.getenv("${key}_$i")!!)
|
rsp.add(System.getenv("${key}_$i")!!)
|
||||||
|
Loading…
Reference in New Issue
Block a user