Skip to content

Commit

Permalink
explicitly build relative path for Tool command in lcov_coverage_test (
Browse files Browse the repository at this point in the history
…bazelbuild#3399)

* explicitly build relative path for Tool command in lcov_coverage_test

filepath.Join(".", "Tool") is just "Tool" because the path is cleaned.
See https://go.dev/play/p/R1KWJ9612fN. Build the relative path
explicitly using "." + string(filepath.Separator) + "Tool"

* fix typo
  • Loading branch information
matloob authored and healthy-pod committed Feb 17, 2023
1 parent 9e4b880 commit e248529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/core/coverage/lcov_coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestLib(t *testing.T) {
}
func TestTool(t *testing.T) {
err := exec.Command(filepath.Join(".", "Tool")).Run()
err := exec.Command("." + string(filepath.Separator) + "Tool").Run()
if err != nil {
t.Error(err)
}
Expand Down

0 comments on commit e248529

Please sign in to comment.