You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class ChangeEnvironmentDomainCommand extends AbstractInvocationCommand
@@ -53,7 +54,7 @@ protected function perform(InputInterface $input, OutputInterface $output)
53
54
if (empty($currentDomain) && $output->confirm(sprintf('Do you want to use the "<comment>%s</comment>" vanity domain as the current environment domain to replace?', $vanityDomain))) {
54
55
$currentDomain = $vanityDomain;
55
56
} elseif (empty($currentDomain)) {
56
-
$currentDomain = (string) $output->ask('What is the current environment domain that you want to replace?');
57
+
$currentDomain = strtolower((string) $output->ask('What is the current environment domain that you want to replace?'));
@@ -62,11 +63,11 @@ protected function perform(InputInterface $input, OutputInterface $output)
62
63
if (is_string($domainOption)) {
63
64
$newDomain = $domainOption;
64
65
} elseif (is_array($domainOption)) {
65
-
$newDomain = (string) $output->choice(sprintf('Which mapped domain do you want to use as the new "<comment>%s</comment>" environment domain?', $environment), $domainOption);
66
+
$newDomain = strtolower((string) $output->choice(sprintf('Which mapped domain do you want to use as the new "<comment>%s</comment>" environment domain?', $environment), $domainOption));
66
67
} elseif (empty($domainOption) && $currentDomain !== $vanityDomain && $output->confirm(sprintf('Do you want to use the "<comment>%s</comment>" vanity domain as the new "<comment>%s</comment>" environment domain?', $vanityDomain, $environment))) {
67
68
$newDomain = $vanityDomain;
68
69
} elseif (empty($domainOption)) {
69
-
$newDomain = (string) $output->ask(sprintf('What is the new domain that you want to use as the new "<comment>%s</comment>" environment domain?', $environment));
70
+
$newDomain = strtolower((string) $output->ask(sprintf('What is the new domain that you want to use as the new "<comment>%s</comment>" environment domain?', $environment)));
@@ -84,6 +85,10 @@ protected function perform(InputInterface $input, OutputInterface $output)
84
85
return;
85
86
}
86
87
88
+
if ($newDomain !== $vanityDomain && !Arr::has((array) $domainOption, $newDomain) && $output->confirm(sprintf('Do you want to add the "<comment>%s</comment>" domain to your "<comment>%s</comment>" environment configuration?', $newDomain, $environment))) {
0 commit comments