(tmpPath string, cause error, cleanupErr error)
| 38 | } |
| 39 | |
| 40 | func stdinSpoolFailureError(tmpPath string, cause error, cleanupErr error) error { |
| 41 | if cleanupErr == nil { |
| 42 | return cause |
| 43 | } |
| 44 | return errors.Join( |
| 45 | cause, |
| 46 | fmt.Errorf("failed to remove temp file %s after stdin spool failure; sensitive stdin data may remain on disk: %w", tmpPath, cleanupErr), |
| 47 | ) |
| 48 | } |