@@ -56,6 +56,13 @@ private function schema(): SchemaType
5656 $ run = S::object ([
5757 'run ' => S::string (),
5858 'cd ' => S::optional (S::string ()),
59+ 'cwd ' => S::optional (S::string ()),
60+ 'env ' => S::optional (S::map (S::string ())),
61+ 'secrets ' => S::optional (S::map (S::string ())),
62+ 'nothrow ' => S::optional (S::boolean ()),
63+ 'forceOutput ' => S::optional (S::boolean ()),
64+ 'timeout ' => S::optional (S::number ()),
65+ 'idleTimeout ' => S::optional (S::number ()),
5966 ]);
6067
6168 $ runLocally = S::object ([
@@ -316,6 +323,13 @@ private function createTask(string $name, ArrayNode $array, string $desc)
316323 try {
317324 run (
318325 $ step ['run ' ],
326+ cwd: $ step ['cwd ' ] ?? null ,
327+ env: $ step ['env ' ] ?? null ,
328+ secrets: $ step ['secrets ' ] ?? null ,
329+ nothrow: $ step ['nothrow ' ] ?? false ,
330+ forceOutput: $ step ['forceOutput ' ] ?? false ,
331+ timeout: $ step ['timeout ' ] ?? null ,
332+ idleTimeout: $ step ['idleTimeout ' ] ?? null ,
319333 );
320334 } catch (\Throwable $ e ) {
321335 $ this ->wrapException ($ e , $ property ->span );
@@ -354,7 +368,7 @@ private function createTask(string $name, ArrayNode $array, string $desc)
354368 }
355369 },
356370 'desc ' , 'once ' , 'hidden ' , 'limit ' , 'select ' => $ task ->$ key ($ step [$ key ]),
357- default => $ this -> throwException ( " Unknown task step $ key " , $ property -> key -> span ) ,
371+ default => $ body ,
358372 };
359373 }
360374 }
0 commit comments