Skip to content

Commit

Permalink
Update Strings.kt
Browse files Browse the repository at this point in the history
Co-authored-by: Islon Scherer <[email protected]>
  • Loading branch information
HT154 and stackoverflow committed Oct 25, 2024
1 parent 5cfefb7 commit 9972d3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkl-cli/src/main/kotlin/org/pkl/cli/CliImportAnalyzer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.pkl.commons.cli.CliCommand
import org.pkl.commons.createParentDirectories
import org.pkl.commons.writeString
import org.pkl.core.ModuleSource
import org.pkl.core.module.ModuleKeyFactories
import org.pkl.core.util.Readers

class CliImportAnalyzer
@JvmOverloads
Expand Down Expand Up @@ -73,7 +73,8 @@ constructor(
.build()
.use { it.evaluateOutputText(sourceModule) }
} finally {
ModuleKeyFactories.closeQuietly(builder.moduleKeyFactories)
Readers.closeQuietly(builder.moduleKeyFactories)
Readers.closeQuietly(builder.resourceReaders)
}
}
}
3 changes: 1 addition & 2 deletions pkl-commons/src/main/kotlin/org/pkl/commons/Strings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import java.net.URI
import java.nio.file.Path
import java.util.*
import java.util.regex.Pattern
import kotlin.collections.ArrayList

fun String.toPath(): Path = Path.of(this)

Expand All @@ -41,7 +40,7 @@ fun String.toUri(): URI {

/** Lex a string into tokens similar to how a shell would */
fun shlex(input: String): List<String> {
val result = ArrayList<String>()
val result = mutableListOf<String>()
var inEscape = false
var quote: Char? = null
var lastCloseQuoteIndex = Int.MIN_VALUE
Expand Down

0 comments on commit 9972d3d

Please sign in to comment.