Skip to content

Commit 17f9df0

Browse files
committed
Cleanup compatibility helper
1 parent 1d79bd5 commit 17f9df0

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

packages/framework/src/Console/Commands/BuildSiteCommand.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ class BuildSiteCommand extends Command
4141

4242
public function handle(): int
4343
{
44-
// CodeCoverageIgnoreStart
45-
if ($this->option('run-dev') || $this->option('run-prod')) {
46-
return $this->deprecatedRunMixCommandFailure();
47-
}
48-
// CodeCoverageIgnoreEnd
44+
$this->checkForDeprecatedRunMixCommandUsage();
4945

5046
$timeStart = microtime(true);
5147

@@ -170,12 +166,14 @@ protected function getExitCode(): int
170166
*
171167
* @codeCoverageIgnore
172168
*/
173-
protected function deprecatedRunMixCommandFailure(): int
169+
protected function checkForDeprecatedRunMixCommandUsage(): void
174170
{
175-
$this->error('The --run-dev and --run-prod options have been removed in HydePHP v2.0.');
176-
$this->info('Please use --run-vite instead to build assets for production with Vite.');
177-
$this->line('See https://github.com/hydephp/develop/pull/2013 for more information.');
171+
if ($this->option('run-dev') || $this->option('run-prod')) {
172+
$this->error('The --run-dev and --run-prod options have been removed in HydePHP v2.0.');
173+
$this->info('Please use --run-vite instead to build assets for production with Vite.');
174+
$this->line('See https://github.com/hydephp/develop/pull/2013 for more information.');
178175

179-
return Command::FAILURE;
176+
exit(Command::INVALID);
177+
}
180178
}
181179
}

0 commit comments

Comments
 (0)