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

Commit

Permalink
Simplify the code around cwd for the go run cmd (#3147)
Browse files Browse the repository at this point in the history
  • Loading branch information
simpleapples authored Apr 6, 2020
1 parent a424c33 commit 0a63ec7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,13 @@ class Delve {
if (mode === 'debug') {
this.noDebug = true;
const runArgs = ['run'];
const runOptions: { [key: string]: any } = { env };
const runOptions: { [key: string]: any } = { cwd: dirname, env };
if (launchArgs.buildFlags) {
runArgs.push(launchArgs.buildFlags);
}
if (isProgramDirectory) {
runOptions.cwd = program;
runArgs.push('.');
} else {
runOptions.cwd = dirname;
runArgs.push(program);
}
if (launchArgs.args) {
Expand Down

0 comments on commit 0a63ec7

Please sign in to comment.