mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Fix dep init outside of git (#2338)
If it is set to null, an error will occur in other processing, so it was initialized with an empty string. SymfonyStyle#ask is v5 with type-hint added. `$default` is ?string so bool is not acceptable. https://github.com/symfony/symfony/blob/5.x/src/Symfony/Component/Console/Style/SymfonyStyle.php#L267
This commit is contained in:
parent
9296a5acc8
commit
52414d9b19
@ -61,7 +61,7 @@ class InitCommand extends Command
|
||||
$template = $io->choice('Select project template', $this->recipes(), 'common');
|
||||
|
||||
// Repo
|
||||
$default = false;
|
||||
$default = '';
|
||||
try {
|
||||
$process = Process::fromShellCommandline('git remote get-url origin');
|
||||
$default = $process->mustRun()->getOutput();
|
||||
@ -86,7 +86,7 @@ class InitCommand extends Command
|
||||
}
|
||||
|
||||
// Project
|
||||
$default = false;
|
||||
$default = '';
|
||||
try {
|
||||
$process = Process::fromShellCommandline('basename "$PWD"');
|
||||
$default = $process->mustRun()->getOutput();
|
||||
|
Loading…
x
Reference in New Issue
Block a user