We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0457f4b commit ee4b378Copy full SHA for ee4b378
1 file changed
src/Task/AbstractCrontabCommand.php
@@ -47,12 +47,12 @@ public function __construct(
47
*/
48
final public function getOptionsWithUser() : array {
49
$options = $this instanceof HasOptionsInterface ? $this->getOptions() : [];
50
- !$this->user ?: $options[] = "-u $this->user";
+ (string) $this->user !== '' && $options[] = "-u $this->user";
51
return $options;
52
}
53
54
final public function __invoke() : void {
55
$output = $this->commandRunner->run($this->crontabCommandFactory->build($this->getOptionsWithUser()));
56
!$this instanceof HasOutputInteface ?: $this->writeln->writeln(PHP_EOL . $output);
57
58
-}
+}
0 commit comments