From 2ef878273eeae1475f8387e8c00717783b16e291 Mon Sep 17 00:00:00 2001 From: Andrey Savenkov Date: Mon, 31 May 2021 21:39:45 +0300 Subject: [PATCH] fixes --- src/Console/Commands/SailInstallCommand.php | 4 ++-- src/SailLumenServiceProvider.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Console/Commands/SailInstallCommand.php b/src/Console/Commands/SailInstallCommand.php index 934df3c..f48d1bd 100644 --- a/src/Console/Commands/SailInstallCommand.php +++ b/src/Console/Commands/SailInstallCommand.php @@ -79,7 +79,7 @@ protected function buildDockerCompose(array $services) })->implode("\n"); $stubs = rtrim(collect($services)->map(function ($service) { - return file_get_contents(__DIR__ . "/../../stubs/{$service}.stub"); + return file_get_contents($this->laravel->basePath("vendor/laravel/sail/stubs/{$service}.stub")); })->implode('')); $volumes = collect($services) @@ -91,7 +91,7 @@ protected function buildDockerCompose(array $services) return $collection->prepend('volumes:'); })->implode("\n"); - $dockerCompose = file_get_contents(__DIR__ . '/../../stubs/docker-compose.stub'); + $dockerCompose = file_get_contents($this->laravel->basePath('vendor/laravel/sail/stubs/docker-compose.stub')); $dockerCompose = str_replace('{{depends}}', empty($depends) ? '' : ' '.$depends, $dockerCompose); $dockerCompose = str_replace('{{services}}', $stubs, $dockerCompose); diff --git a/src/SailLumenServiceProvider.php b/src/SailLumenServiceProvider.php index 53b7f06..2cc6d24 100644 --- a/src/SailLumenServiceProvider.php +++ b/src/SailLumenServiceProvider.php @@ -21,6 +21,7 @@ class SailLumenServiceProvider extends ServiceProvider */ protected $commands = [ 'SailInstall' => 'command.sail.install', + 'SailPublish' => 'command.sail.publish', 'Serve' => 'command.serve', ];