Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

☁️ #53623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 22, 2024
Merged

☁️ #53623

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
formatting
  • Loading branch information
taylorotwell committed Nov 21, 2024
commit 952eb1453ddc62da8779fa2ff14a558f5c84638d
20 changes: 3 additions & 17 deletions 20 src/Illuminate/Console/Scheduling/CommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,9 @@ protected function buildForegroundCommand(Event $event)
{
$output = ProcessUtils::escapeArgument($event->output);

if (laravel_cloud()) {
return $this->ensureCorrectUser(
$event, $event->command.' 2>&1 | tee '.($event->shouldAppendOutput ? '-a ' : '').$output
);
} else {
return $this->ensureCorrectUser(
$event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1'
);
}
return laravel_cloud()
? $this->ensureCorrectUser($event, $event->command.' 2>&1 | tee '.($event->shouldAppendOutput ? '-a ' : '').$output)
: $this->ensureCorrectUser($event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1');
}

/**
Expand All @@ -61,14 +55,6 @@ protected function buildBackgroundCommand(Event $event)
return 'start /b cmd /v:on /c "('.$event->command.' & '.$finished.' ^!ERRORLEVEL^!)'.$redirect.$output.' 2>&1"';
}

if (laravel_cloud()) {
$event->storeOutput();

return $this->ensureCorrectUser($event,
'('.$event->command.' 2>&1 | tee '.($event->shouldAppendOutput ? '-a ' : '').$output.'; '.$finished.' "$?") 2>&1 &'
);
}

return $this->ensureCorrectUser($event,
'('.$event->command.$redirect.$output.' 2>&1 ; '.$finished.' "$?") > '
.ProcessUtils::escapeArgument($event->getDefaultOutput()).' 2>&1 &'
Expand Down
10 changes: 5 additions & 5 deletions 10 src/Illuminate/Console/Scheduling/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ protected function start($container)
*/
protected function execute($container)
{
$callback = laravel_cloud()
? fn ($type, $line) => fwrite($type === 'out' ? STDOUT : STDERR, $line)
: fn () => true;

return Process::fromShellCommandline(
$this->buildCommand(), base_path(), null, null, null
)->run($callback);
)->run(
laravel_cloud()
? fn ($type, $line) => fwrite($type === 'out' ? STDOUT : STDERR, $line)
: fn () => true
);
}

/**
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.