-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI-1330: TypeError for SSH commands on Node environments
- Loading branch information
1 parent
6ced4f9
commit 92daf9a
Showing
13 changed files
with
36 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1333,7 +1333,7 @@ protected function isAcsfEnv(mixed $cloudEnvironment): bool { | |
protected function getAcsfSites(EnvironmentResponse $cloudEnvironment): array { | ||
Check warning on line 1333 in src/Command/CommandBase.php
|
||
$envAlias = self::getEnvironmentAlias($cloudEnvironment); | ||
$command = ['cat', "/var/www/site-php/$envAlias/multisite-config.json"]; | ||
$process = $this->sshHelper->executeCommand($cloudEnvironment, $command, FALSE); | ||
$process = $this->sshHelper->executeCommand($cloudEnvironment->sshUrl, $command, FALSE); | ||
if ($process->isSuccessful()) { | ||
return json_decode($process->getOutput(), TRUE, 512, JSON_THROW_ON_ERROR); | ||
} | ||
|
@@ -1346,7 +1346,7 @@ protected function getAcsfSites(EnvironmentResponse $cloudEnvironment): array { | |
private function getCloudSites(EnvironmentResponse $cloudEnvironment): array { | ||
$sitegroup = self::getSitegroup($cloudEnvironment); | ||
$command = ['ls', $this->getCloudSitesPath($cloudEnvironment, $sitegroup)]; | ||
$process = $this->sshHelper->executeCommand($cloudEnvironment, $command, FALSE); | ||
$process = $this->sshHelper->executeCommand($cloudEnvironment->sshUrl, $command, FALSE); | ||
$sites = array_filter(explode("\n", trim($process->getOutput()))); | ||
if ($process->isSuccessful() && $sites) { | ||
return $sites; | ||
|
@@ -1843,4 +1843,16 @@ protected function validatePhpVersion(string $version): string { | |
return $version; | ||
} | ||
|
||
protected function promptChooseDrupalSite(EnvironmentResponse $environment): string { | ||
if ($this->isAcsfEnv($environment)) { | ||
return $this->promptChooseAcsfSite($environment); | ||
} | ||
|
||
if ($environment->type === 'drupal') { | ||
return $this->promptChooseCloudSite($environment); | ||
} | ||
|
||
throw new AcquiaCliException('Environment type {type} is not supported', ['type' => $environment->type]); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters