diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ffceb5e..221c4ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,12 +25,12 @@ jobs: - name: Lint (linux) uses: golangci/golangci-lint-action@v9 with: - version: v2.14.0 + version: v2.15.0 - name: Lint (darwin) uses: golangci/golangci-lint-action@v9 with: - version: v2.14.0 + version: v2.15.0 env: GOOS: darwin diff --git a/cmd/devbox/shell.go b/cmd/devbox/shell.go index 9f07bc6..f379d2e 100644 --- a/cmd/devbox/shell.go +++ b/cmd/devbox/shell.go @@ -140,13 +140,15 @@ func containerExec(ctx context.Context, containerID string, cmd []string) (stdou done := make(chan error) go func() { - _, err = stdcopy.StdCopy(&stdout, &stderr, execAttachResp.Reader) + _, err := stdcopy.StdCopy(&stdout, &stderr, execAttachResp.Reader) done <- err }() select { - case <-done: - break + case err := <-done: + if err != nil { + return nil, nil, fmt.Errorf("failed to copy exec output: %w", err) + } case <-ctx.Done(): return nil, nil, errors.New("context cancelled") }