Skip to content

Commit 704af44

Browse files
committed
Fix ProcessRunner
1 parent b40c641 commit 704af44

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ runLocally("echo $user");
234234
- **idle_timeout** `int|null` — Sets the process idle timeout (max. time since last output) in seconds.
235235
- **secret** `string|null` — Placeholder `%secret%` can be used in command. Placeholder will be replaced with this value and will not appear in any logs.
236236
- **env** `array|null` — Array of environment variables: `runLocally('echo $KEY', env: ['key' => 'value']);`
237-
- **shell** `string|null` — Shell to run in. Default is `bash -c`.
237+
- **shell** `string|null` — Shell to run in. Default is `bash -s`.
238238

239239
## test()
240240

src/Component/ProcessRunner/ProcessRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function run(Host $host, string $command, array $config = []): string
3838
'idle_timeout' => null,
3939
'cwd' => defined('DEPLOYER_ROOT') ? DEPLOYER_ROOT : null,
4040
'real_time_output' => false,
41-
'shell' => 'bash -c',
41+
'shell' => 'bash -s',
4242
];
4343
$config = array_merge($defaults, $config);
4444

src/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function run(string $command, ?array $options = [], ?int $timeout = null, ?int $
401401
* @param int|null $idle_timeout Sets the process idle timeout (max. time since last output) in seconds.
402402
* @param string|null $secret Placeholder `%secret%` can be used in command. Placeholder will be replaced with this value and will not appear in any logs.
403403
* @param array|null $env Array of environment variables: `runLocally('echo $KEY', env: ['key' => 'value']);`
404-
* @param string|null $shell Shell to run in. Default is `bash -c`.
404+
* @param string|null $shell Shell to run in. Default is `bash -s`.
405405
*
406406
* @throws RunException
407407
*/

tests/e2e/recipe/misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require_once __DIR__ . '/hosts.php';
66

77
task('test:misc:sudo-write-user', function (): void {
8-
$cmd = 'sudo bash -c \'echo Current user is: $USER\'';
8+
$cmd = 'sudo bash -s \'echo Current user is: $USER\'';
99
$output = run($cmd);
1010
writeln($output);
1111
})->shallow();

0 commit comments

Comments
 (0)