Skip to content

Commit

Permalink
Update src/Commands/BuildCommand.php
Browse files Browse the repository at this point in the history
Co-authored-by: Owen Voke <development@voke.dev>
  • Loading branch information
caendesilva and owenvoke authored Dec 5, 2023
1 parent 7258023 commit 516058f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,14 @@ private function compile(string $name): BuildCommand
$this->task(' 2. <fg=yellow>Compile</> into a single file');

$this->output->newLine();

$pharPath = $this->app->basePath($this->getBinary()) . '.phar';

if (! File::exists($this->app->basePath($this->getBinary()) . '.phar')) {
throw new \RuntimeException('Failed to compile the application.');
if (! File::exists($pharPath)) {
throw new RuntimeException('Failed to compile the application.');
}

File::move($this->app->basePath($this->getBinary()).'.phar', $this->app->buildsPath($name));
File::move($pharPath, $this->app->buildsPath($name));

return $this;
}
Expand Down

0 comments on commit 516058f

Please sign in to comment.