def runPantsImport()

in multiversion/src/main/scala/multiversion/commands/PantsExportCommand.scala [58:76]


  def runPantsImport(): Result[ThirdpartyConfig] = {
    if (!Files.isRegularFile(outputPath)) {
      ErrorResult(
        Diagnostic.error(
          s"no such file: $outputPath\n" +
            s"\tTo fix this problem, run Pants bazel-multideps again."
        )
      )
    } else {
      for {
        json <- JsonParser.parse(Input.path(outputPath))
        _ = Files.write(
          outputPath,
          json.toDoc.render(120).getBytes(StandardCharsets.UTF_8)
        )
        thirdparty <- ThirdpartyConfig.parseJson(Input.path(outputPath))
      } yield thirdparty
    }
  }