Skip to content

Commit

Permalink
Linter fix: testifylint (go-require)
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardGomezEscandell committed Mar 11, 2024
1 parent 90b8ef1 commit 07f0386
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion distro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package gowsl_test
import (
"context"
"fmt"
"os/exec"
"regexp"
"sync"
"testing"
Expand Down Expand Up @@ -623,7 +624,15 @@ func asyncNewTestDistro(t *testing.T, ctx context.Context, rootFs string) wsl.Di

go func() {
defer wg.Done()
installDistro(t, ctx, d.Name(), loc, rootFs)

defer wslExeGuard(2 * time.Minute)()
cmd := fmt.Sprintf("$env:WSL_UTF8=1 ; wsl --import %q %q %q", d.Name(), loc, rootFs)
//nolint:gosec // Code injection is not a concern in tests.
out, err := exec.Command("powershell.exe", "-Command", cmd).CombinedOutput()
if err != nil {
t.Logf("Setup: failed to register %q: %s", d.Name(), out)
}
// We cannot fail here because this is not the main test goroutine
}()

t.Cleanup(func() {
Expand Down

0 comments on commit 07f0386

Please sign in to comment.