Skip to content

Commit 4fcd1d8

Browse files
tamayikah9jiang
authored andcommitted
extension/src/goTest: save only dirty files
Fixes #3837 Change-Id: I46bbd7d3c4dea866bff2419a631f2407d6989835 GitHub-Last-Rev: 2d7676b GitHub-Pull-Request: #3838 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/696355 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Hongxiang Jiang <[email protected]> Reviewed-by: Carlos Amedee <[email protected]>
1 parent 3988749 commit 4fcd1d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extension/src/goTest/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ export class GoTestRunner {
247247
// Save all documents that contain a test we're about to run, to ensure `go
248248
// test` has the latest changes
249249
const fileUris = new Set(Array.from(files).map((x) => x.uri));
250-
await Promise.all(this.workspace.textDocuments.filter((x) => fileUris.has(x.uri)).map((x) => x.save()));
250+
await Promise.all(
251+
this.workspace.textDocuments.filter((x) => fileUris.has(x.uri) && x.isDirty).map((x) => x.save())
252+
);
251253

252254
let hasBench = false,
253255
hasNonBench = false;

0 commit comments

Comments
 (0)