Skip to content

Commit 80bfc3f

Browse files
committed
fix(sudo): Simplify sudo password application condition
- Remove unnecessary check for PHP SAPI in shouldApplySudoPassword method. - Ensure the sudo password applies correctly on Unix systems. - This change makes the logic clearer and more straightforward for future maintenance. Signed-off-by: guanguans <[email protected]>
1 parent cc27437 commit 80bfc3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"composer/composer": "^2.9",
5050
"ergebnis/composer-normalize": "^2.48",
5151
"ergebnis/license": "^2.7",
52-
"ergebnis/php-cs-fixer-config": "^6.56",
52+
"ergebnis/php-cs-fixer-config": "^6.57",
5353
"ergebnis/rector-rules": "^1.7",
5454
"guanguans/monorepo-builder-worker": "^2.1",
5555
"illuminate/support": "^10.49 || ^11.0 || ^12.0",
@@ -84,7 +84,7 @@
8484
"tomasvotruba/class-leak": "^2.1",
8585
"tomasvotruba/cognitive-complexity": "^1.0",
8686
"tomasvotruba/type-coverage": "^2.0",
87-
"yamadashy/phpstan-friendly-formatter": "^1.2"
87+
"yamadashy/phpstan-friendly-formatter": "^1.3"
8888
},
8989
"conflict": {
9090
"pestphp/pest": "^4.0",

src/Concerns/HasSudoPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public function withSudoPassword(
3838

3939
protected function shouldApplySudoPassword(): bool
4040
{
41-
return $this->sudoPassword && OsHelper::isUnix() && !\in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg', 'embed'], true);
41+
return $this->sudoPassword && OsHelper::isUnix();
4242
}
4343
}

0 commit comments

Comments
 (0)