@@ -208,7 +208,7 @@ export async function runQuickAction(): Promise<void> {
208208 if ( result . exitCode === 3 ) {
209209 await vscode . window . showInformationMessage ( `No matches found for "${ pattern } ".` ) ;
210210 } else if ( result . exitCode !== 0 ) {
211- await vscode . window . showErrorMessage ( `Patchloom search failed: ${ formatPatchloomOutput ( result ) } ` ) ;
211+ await vscode . window . showErrorMessage ( `Patchloom search failed: ${ formatCliOutput ( result ) } ` ) ;
212212 } else {
213213 log ?. show ( ) ;
214214 await vscode . window . showInformationMessage ( "Search results displayed in the Patchloom output channel." ) ;
@@ -249,7 +249,7 @@ export async function runQuickAction(): Promise<void> {
249249 const result = await executePatchloom ( binaryPath , action . args , folder . uri . fsPath ) ;
250250
251251 if ( result . exitCode !== 0 ) {
252- await vscode . window . showErrorMessage ( `Patchloom create failed: ${ formatPatchloomOutput ( result ) } ` ) ;
252+ await vscode . window . showErrorMessage ( `Patchloom create failed: ${ formatCliOutput ( result ) } ` ) ;
253253 return ;
254254 }
255255
@@ -289,7 +289,7 @@ export async function runQuickAction(): Promise<void> {
289289 const result = await executePatchloom ( binaryPath , action . args , target . workspaceFolder . uri . fsPath ) ;
290290
291291 if ( result . exitCode !== 0 ) {
292- await vscode . window . showErrorMessage ( `Patchloom doc get failed: ${ formatPatchloomOutput ( result ) } ` ) ;
292+ await vscode . window . showErrorMessage ( `Patchloom doc get failed: ${ formatCliOutput ( result ) } ` ) ;
293293 return ;
294294 }
295295
@@ -430,7 +430,7 @@ async function previewAndMaybeApply(
430430 const result = await executePatchloom ( binaryPath , withApplyFlag ( action . args ) , target . workspaceFolder . uri . fsPath ) ;
431431 if ( result . exitCode !== 0 ) {
432432 await vscode . window . showErrorMessage (
433- `Patchloom failed while applying changes to ${ target . relativePath } : ${ formatPatchloomOutput ( result ) } `
433+ `Patchloom failed while applying changes to ${ target . relativePath } : ${ formatCliOutput ( result ) } `
434434 ) ;
435435 return ;
436436 }
@@ -457,7 +457,7 @@ async function buildPreviewDocument(
457457 const previewAction = retargetQuickAction ( action , tempPath ) ;
458458 const result = await executePatchloom ( binaryPath , withApplyFlag ( previewAction . args ) , tempDir ) ;
459459 if ( result . exitCode !== 0 && result . exitCode !== 3 ) {
460- throw new Error ( formatPatchloomOutput ( result ) ) ;
460+ throw new Error ( formatCliOutput ( result ) ) ;
461461 }
462462
463463 const previewContent = await fs . readFile ( tempPath , "utf8" ) ;
@@ -640,10 +640,6 @@ async function executePatchloom(
640640 }
641641}
642642
643- function formatPatchloomOutput ( result : PatchloomCommandResult ) : string {
644- return formatCliOutput ( result ) ;
645- }
646-
647643function sameFilePath ( left : string , right : string ) : boolean {
648644 const normalize = ( value : string ) => process . platform === "win32"
649645 ? path . resolve ( value ) . toLowerCase ( )
0 commit comments