File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -124,21 +124,21 @@ Under the hood the process will use `scp`.
124
124
125
125
Behind the scenes all commands will be performed using [ Symfonys ` Process ` ] ( https://symfony.com/doc/current/components/process.html ) .
126
126
127
- You can configure to the ` Process ` by using the ` configureProcess ` method. Here's and example where we disable the timeout.
127
+ You can configure to the ` Process ` by using the ` configureProcess ` method. Here's an example where we disable the timeout.
128
128
129
129
``` php
130
130
Ssh::create('user', 'host')->configureProcess(fn (Process $process) => $process->setTimeout(null));
131
131
```
132
132
133
133
### Immediately responding to output
134
134
135
- You can get notified whenever you command produces output by setting by passing a closure to ` onOutput ` .
135
+ You can get notified whenever your command produces output by passing a closure to ` onOutput ` .
136
136
137
137
``` php
138
138
Ssh::create('user', 'host')->onOutput(fn($type, $line) => echo $line)->execute('whoami');
139
139
```
140
140
141
- Whenever there is output that close will get called with two parameters:
141
+ Whenever there is output that closure will get called with two parameters:
142
142
- ` type ` : this can be ` Symfony\Component\Process\Process::OUT ` for regular output and ` Symfony\Component\Process\Process::ERR ` for error output
143
143
- ` line ` : the output itself
144
144
You can’t perform that action at this time.
0 commit comments