Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Use output channel to show rename errors. Fixes #1663
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed May 9, 2018
1 parent 0f166fe commit caf86b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/goRename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import cp = require('child_process');
import { getBinPath, byteOffsetAt, canonicalizeGOPATHPrefix, getToolsEnvVars, killProcess } from './util';
import { getEditsFromUnifiedDiffStr, isDiffToolAvailable, FilePatch, Edit } from './diffUtils';
import { promptForMissingTool } from './goInstallTools';
import { outputChannel } from './goStatus';

export class GoRenameProvider implements vscode.RenameProvider {

Expand Down Expand Up @@ -51,7 +52,9 @@ export class GoRenameProvider implements vscode.RenameProvider {
if (err) {
let errMsg = stderr ? 'Rename failed: ' + stderr.replace(/\n/g, ' ') : 'Rename failed';
console.log(errMsg);
return reject(errMsg);
outputChannel.appendLine(errMsg);
outputChannel.show();
return reject();
}

let result = new vscode.WorkspaceEdit();
Expand Down

0 comments on commit caf86b1

Please sign in to comment.