From 0a63ec7cd9e9e14ecf77b764faa411a7a06aad52 Mon Sep 17 00:00:00 2001 From: Zhiya Zang Date: Mon, 6 Apr 2020 09:45:40 +0800 Subject: [PATCH] Simplify the code around cwd for the go run cmd (#3147) --- src/debugAdapter/goDebug.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 90a6fb103..66bcbd5f9 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -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) {