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

Commit

Permalink
Fix buildFlags type in 'debug test' Codelens (#1248)
Browse files Browse the repository at this point in the history
* Make `go.buildTags` pass correctly via Delve

* Quote all build flags when passing to debug
  • Loading branch information
ka2n authored and ramya-rao-a committed Oct 1, 2017
1 parent 1ee173e commit 7b9abd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/goRunTestCodelens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ export class GoRunTestCodeLensProvider extends GoBaseCodeLensProvider {
let buildFlags = getTestFlags(vsConfig, null);
if (vsConfig['buildTags'] && buildFlags.indexOf('-tags') === -1) {
buildFlags.push('-tags');
buildFlags.push(`"${vsConfig['buildTags']}"`);
buildFlags.push(`${vsConfig['buildTags']}`);
}

let config = Object.assign({}, this.debugConfig, { args, program, env, envFile, buildFlags });
let config = Object.assign({}, this.debugConfig, { args, program, env, envFile, buildFlags: buildFlags.map(x => `'${x}'`).join(' ') });
let debugTestCmd: Command = {
title: 'debug test',
command: 'vscode.startDebug',
Expand Down

0 comments on commit 7b9abd6

Please sign in to comment.