Commit ab6317d32b

Alex Kladov <aleksey.kladov@gmail.com>
2024-02-17 23:31:48
std: fix copy-paste typo in spawnWindows
1 parent f3bd177
Changed files (1)
lib/std/child_process.zig
@@ -720,7 +720,7 @@ pub const ChildProcess = struct {
                 g_hChildStd_OUT_Wr = null;
             },
         }
-        errdefer if (self.stdin_behavior == StdIo.Pipe) {
+        errdefer if (self.stdout_behavior == StdIo.Pipe) {
             windowsDestroyPipe(g_hChildStd_OUT_Rd, g_hChildStd_OUT_Wr);
         };
 
@@ -740,7 +740,7 @@ pub const ChildProcess = struct {
                 g_hChildStd_ERR_Wr = null;
             },
         }
-        errdefer if (self.stdin_behavior == StdIo.Pipe) {
+        errdefer if (self.stderr_behavior == StdIo.Pipe) {
             windowsDestroyPipe(g_hChildStd_ERR_Rd, g_hChildStd_ERR_Wr);
         };