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

Commit

Permalink
Show err ms when package not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jul 23, 2018
1 parent 4e2c08b commit d2579a5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/goImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,9 @@ export function addImportToWorkspace() {
const env = getToolsEnvVars();

cp.execFile(goRuntimePath, ['list', '-f', '{{.Dir}}', importPath], { env }, (err, stdout, stderr) => {
if (!stdout) {
return;
}

let dirs = stdout.split('\n');
let dirs = (stdout || '').split('\n');
if (dirs.length === 0) {
vscode.window.showErrorMessage(`Could not find ${importPath}`);
return;
}

Expand Down

0 comments on commit d2579a5

Please sign in to comment.