private async openInDiffTool()

in src/controller/diffController.ts [24:44]


  private async openInDiffTool(uris: [vscode.Uri, vscode.Uri]) {
    const [left, right] = uris;
    const leftUri = vscode.Uri.parse(left.toString());
    const rightUri = vscode.Uri.parse(right.toString());
    const leftPath = leftUri.fsPath;
    const rightPath = rightUri.fsPath;

    const diffCommand = await this.getDiffCommand();
    if (!diffCommand) {
      return false;
    }

    const diffProcess = spawn(diffCommand, [leftPath, rightPath]);
    diffProcess.on("error", (err) => {
      vscode.window.showErrorMessage(
        `External Diff Tool failed to launch: ${err.message}`
      );
      return false;
    });
    return true;
  }