Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit daa0269

Browse files
Optimized publish command.
1 parent 1ecfe67 commit daa0269

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/Console/Commands/PublishCommand.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,10 @@ public function handle(): void
4747

4848
// Add the manifest if it doesn't exists, or if the user confirms the replace.
4949
if ($this->filesystem->missing($path) || $this->confirm('A manifest file already exists. Overwrite?')) {
50-
$this->putFile($path);
50+
$this->filesystem->ensureDirectoryExists($this->laravel->basePath('settings'));
51+
$this->filesystem->copy(static::STUB_PATH, $path);
52+
5153
$this->info("Manifest published. Check it at: $path");
5254
}
5355
}
54-
55-
/**
56-
* Puts the stub into the application directory.
57-
*
58-
* @param string $path
59-
*/
60-
protected function putFile(string $path): void
61-
{
62-
$this->filesystem->ensureDirectoryExists($this->laravel->basePath('settings'));
63-
$this->filesystem->copy(static::STUB_PATH, $path);
64-
}
6556
}

0 commit comments

Comments
 (0)