| ... | @@ -52,6 +52,8 @@ term: ?(SpawnError!Term), | ... | @@ -52,6 +52,8 @@ term: ?(SpawnError!Term), |
| 52 | argv: []const []const u8, | 52 | argv: []const []const u8, |
| 53 | | 53 | |
| 54 | /// Leave as null to use the current env map using the supplied allocator. | 54 | /// Leave as null to use the current env map using the supplied allocator. |
| | 55 | /// Required if unable to access the current env map (e.g. building a library on |
| | 56 | /// some platforms). |
| 55 | env_map: ?*const EnvMap, | 57 | env_map: ?*const EnvMap, |
| 56 | | 58 | |
| 57 | stdin_behavior: StdIo, | 59 | stdin_behavior: StdIo, |
| ... | @@ -414,6 +416,8 @@ pub fn run(args: struct { | ... | @@ -414,6 +416,8 @@ pub fn run(args: struct { |
| 414 | argv: []const []const u8, | 416 | argv: []const []const u8, |
| 415 | cwd: ?[]const u8 = null, | 417 | cwd: ?[]const u8 = null, |
| 416 | cwd_dir: ?fs.Dir = null, | 418 | cwd_dir: ?fs.Dir = null, |
| | 419 | /// Required if unable to access the current env map (e.g. building a |
| | 420 | /// library on some platforms). |
| 417 | env_map: ?*const EnvMap = null, | 421 | env_map: ?*const EnvMap = null, |
| 418 | max_output_bytes: usize = 50 * 1024, | 422 | max_output_bytes: usize = 50 * 1024, |
| 419 | expand_arg0: Arg0Expand = .no_expand, | 423 | expand_arg0: Arg0Expand = .no_expand, |
| ... | @@ -614,7 +618,7 @@ fn spawnPosix(self: *ChildProcess) SpawnError!void { | ... | @@ -614,7 +618,7 @@ fn spawnPosix(self: *ChildProcess) SpawnError!void { |
| 614 | })).ptr; | 618 | })).ptr; |
| 615 | } else { | 619 | } else { |
| 616 | // TODO come up with a solution for this. | 620 | // TODO come up with a solution for this. |
| 617 | @compileError("missing std lib enhancement: ChildProcess implementation has no way to collect the environment variables to forward to the child process"); | 621 | @panic("missing std lib enhancement: ChildProcess implementation has no way to collect the environment variables to forward to the child process"); |
| 618 | } | 622 | } |
| 619 | }; | 623 | }; |
| 620 | | 624 | |