mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.process.Child: run fn accepts std.Progress.Node
There was not a way to pass a progress node to this function until now.
This commit is contained in:
parent
20e20f9238
commit
42658de762
@ -101,7 +101,7 @@ resource_usage_statistics: ResourceUsageStatistics = .{},
|
|||||||
///
|
///
|
||||||
/// The child's progress tree will be grafted into the parent's progress tree,
|
/// The child's progress tree will be grafted into the parent's progress tree,
|
||||||
/// by substituting this node with the child's root node.
|
/// by substituting this node with the child's root node.
|
||||||
progress_node: std.Progress.Node = .{ .index = .none },
|
progress_node: std.Progress.Node = std.Progress.Node.none,
|
||||||
|
|
||||||
pub const ResourceUsageStatistics = struct {
|
pub const ResourceUsageStatistics = struct {
|
||||||
rusage: @TypeOf(rusage_init) = rusage_init,
|
rusage: @TypeOf(rusage_init) = rusage_init,
|
||||||
@ -376,6 +376,7 @@ pub fn run(args: struct {
|
|||||||
env_map: ?*const EnvMap = null,
|
env_map: ?*const EnvMap = null,
|
||||||
max_output_bytes: usize = 50 * 1024,
|
max_output_bytes: usize = 50 * 1024,
|
||||||
expand_arg0: Arg0Expand = .no_expand,
|
expand_arg0: Arg0Expand = .no_expand,
|
||||||
|
progress_node: std.Progress.Node = std.Progress.Node.none,
|
||||||
}) RunError!RunResult {
|
}) RunError!RunResult {
|
||||||
var child = ChildProcess.init(args.argv, args.allocator);
|
var child = ChildProcess.init(args.argv, args.allocator);
|
||||||
child.stdin_behavior = .Ignore;
|
child.stdin_behavior = .Ignore;
|
||||||
@ -385,6 +386,7 @@ pub fn run(args: struct {
|
|||||||
child.cwd_dir = args.cwd_dir;
|
child.cwd_dir = args.cwd_dir;
|
||||||
child.env_map = args.env_map;
|
child.env_map = args.env_map;
|
||||||
child.expand_arg0 = args.expand_arg0;
|
child.expand_arg0 = args.expand_arg0;
|
||||||
|
child.progress_node = args.progress_node;
|
||||||
|
|
||||||
var stdout = std.ArrayList(u8).init(args.allocator);
|
var stdout = std.ArrayList(u8).init(args.allocator);
|
||||||
var stderr = std.ArrayList(u8).init(args.allocator);
|
var stderr = std.ArrayList(u8).init(args.allocator);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user