Skip to content

Commit c754919

Browse files
committed
:$cwd param for process spawning
1 parent 5dc0865 commit c754919

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/Type/Proc.pod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ second command, you can do
4646
Bool :$merge = False,
4747
Str:D :$enc = 'UTF-8',
4848
Str:D $nl = "\n",
49+
:$cwd = $*CWD,
4950
*@args
5051
) returns Proc:D
5152
@@ -74,9 +75,9 @@ merged in C<$proc.out>.
7475
7576
=head2 method spawn
7677
77-
method spawn(Proc:D *@args ($, *@)) returns Bool:D
78+
method spawn(Proc:D *@args ($, *@), :$cwd = $*CWD) returns Bool:D
7879
79-
Runs the C<Proc> objects with the given command and argument list.
80+
Runs the C<Proc> objects with the given command, argument list, and working directory.
8081
8182
=head2 method exitcode
8283

lib/Type/Proc/Async.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ the program through C<print>, C<say> and C<write>.
114114
115115
=head2 method start
116116
117-
method start(Proc::Async:D:, :$scheduler = $*SCHEDULER) returns Promise:D
117+
method start(Proc::Async:D:, :$scheduler = $*SCHEDULER, :$cwd = $*CWD) returns Promise:D
118118
119119
Initiates spawning of the external program. Returns a promise that will be
120120
kept with a L<Proc::Status|/type/Proc::Status> object once the external

0 commit comments

Comments
 (0)