Skip to content

Commit 8f6cb5d

Browse files
ras0qhyangah
authored andcommitted
goGenerateTests: resolve config file path
Fixes #2342 Change-Id: If40a6941537ad54ffd58154c28eec610057fb8dc GitHub-Last-Rev: b9342aa GitHub-Pull-Request: #2344 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/417675 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]> TryBot-Result: kokoro <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
1 parent aba3079 commit 8f6cb5d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/goGenerateTests.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { toolExecutionEnvironment } from './goEnv';
1616
import { promptForMissingTool } from './goInstallTools';
1717
import { GoDocumentSymbolProvider } from './goDocumentSymbols';
1818
import { outputChannel } from './goStatus';
19-
import { getBinPath } from './util';
19+
import { getBinPath, resolvePath } from './util';
2020
import { CommandFactory } from './commands';
2121
import { GoExtensionContext } from './context';
2222

@@ -178,6 +178,12 @@ function generateTests(
178178
i++;
179179
continue;
180180
}
181+
if (i + 1 < goGenerateTestsFlags.length && (flag === '-template_dir' || flag === '-template_params_file')) {
182+
const configFilePath = resolvePath(goGenerateTestsFlags[i + 1]);
183+
args.push(flag, configFilePath);
184+
i++;
185+
continue;
186+
}
181187
args.push(flag);
182188
}
183189

0 commit comments

Comments
 (0)