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

Commit

Permalink
Workaround for electron issue in #1845
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Aug 15, 2018
1 parent 0b68d09 commit 4e6b295
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Binary file modified Go-latest.vsix
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Go",
"version": "0.6.87-beta.1",
"version": "0.6.87",
"publisher": "ms-vscode",
"description": "Rich Go language support for Visual Studio Code",
"author": {
Expand Down
8 changes: 7 additions & 1 deletion src/goPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ let allPkgsCache: Map<string, Cache> = new Map<string, Cache>();
let pkgRootDirs = new Map<string, string>();

function gopkgs(workDir?: string): Promise<Map<string, string>> {
const gopkgsBinPath = getBinPath('gopkgs');
if (!path.isAbsolute(gopkgsBinPath)) {
promptForMissingTool('gopkgs');
return Promise.resolve(new Map<string, string>());
}

let t0 = Date.now();
return new Promise<Map<string, string>>((resolve, reject) => {
const args = ['-format', '{{.Name}};{{.ImportPath}}'];
if (workDir) {
args.push('-workDir', workDir);
}

const cmd = cp.spawn(getBinPath('gopkgs'), args, { env: getToolsEnvVars() });
const cmd = cp.spawn(gopkgsBinPath, args, { env: getToolsEnvVars() });
const chunks = [];
const errchunks = [];
let err: any;
Expand Down

0 comments on commit 4e6b295

Please sign in to comment.