Skip to content

Commit

Permalink
[fix] Avoid JSON parsing errors caused by line wrapping (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutoiris authored Jan 15, 2025
1 parent 3318588 commit 098638b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/org/move/cli/runConfigurations/aptos/Aptos.kt
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ data class Aptos(val cliLocation: Path, val parentDisposable: Disposable?): Disp
}

val json = processOutput.stdout
.lines().dropWhile { l -> !l.startsWith("{") }.joinToString("\n").trim()
.lines().dropWhile { l -> !l.startsWith("{") }.joinToString("").trim()
val exitStatus = try {
AptosExitStatus.fromJson(json)
} catch (e: JacksonException) {
Expand Down Expand Up @@ -240,4 +240,4 @@ val Project.isCompilerJsonOutputEnabled
get() = this.moveSettings.enableMove2
&& AdvancedSettings.getBoolean("org.move.aptos.compile.message.json")

val MoveProject.workingDirectory: Path get() = this.currentPackage.contentRoot.pathAsPath
val MoveProject.workingDirectory: Path get() = this.currentPackage.contentRoot.pathAsPath

0 comments on commit 098638b

Please sign in to comment.