Skip to content

Commit

Permalink
Update NewCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored May 5, 2024
1 parent 1897e82 commit 3703aee
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,25 +694,6 @@ protected function commitChanges(string $message, string $directory, InputInterf
$this->runCommands($commands, $input, $output, workingPath: $directory);
}

/**
* Gets the "tld" that should be used.
*
* @return string
*/
protected function getTld()
{
foreach (['herd', 'valet'] as $tool) {
$process = new Process([$tool, 'tld']);
$process->run();

if ($process->isSuccessful()) {
return trim($process->getOutput());
}
}

return 'test';
}

/**
* Create a GitHub repository and push the git log to it.
*
Expand Down Expand Up @@ -769,6 +750,26 @@ protected function generateAppUrl($name)
return $this->canResolveHostname($hostname) ? 'http://'.$hostname : 'http://localhost';
}

/**
* Get the TLD for the application.
*
* @return string
*/
protected function getTld()
{
foreach (['herd', 'valet'] as $tool) {
$process = new Process([$tool, 'tld']);

$process->run();

if ($process->isSuccessful()) {
return trim($process->getOutput());
}
}

return 'test';
}

/**
* Determine whether the given hostname is resolvable.
*
Expand Down

0 comments on commit 3703aee

Please sign in to comment.