Skip to content

Commit

Permalink
Fix depraction in in doc about run()
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Nov 28, 2024
1 parent dc38be8 commit cd38da5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/getting-started/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ do that by setting the `tty` option to `true`:
use Castor\Attribute\AsTask;

use function Castor\run;
use function Castor\context;

#[AsTask()]
function foo(): void
{
run('echo "bar"', tty: true);
run('echo "bar"', context: context()->withTty(false));
}
```

Expand All @@ -174,10 +175,11 @@ the process:
use Castor\Attribute\AsTask;

use function Castor\run;
use function Castor\context;

#[AsTask()]
function foo(): void
{
run('echo "bar"', pty: false);
run('echo "bar"', context: context()->withPty(false));
}
```

0 comments on commit cd38da5

Please sign in to comment.