Skip to content

Commit 994b6c3

Browse files
committed
Add new function.
1 parent 42eef33 commit 994b6c3

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/Commands/Remote/SSHBaseCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ private function getCommandSummary($command_args)
376376
*/
377377
private function getConnectionString()
378378
{
379-
$sftp = $this->environment->sftpConnectionInfo('ssh');
379+
$ssh = $this->environment->sshConnectionInfo();
380380
$command = $this->getConfig()->get('ssh_command');
381381
if ($this->output()->isDebug()) {
382382
$command .= ' -vvv';

src/Models/Environment.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -985,19 +985,23 @@ public function setHttpsCertificate($certificate = [])
985985
}
986986

987987
/**
988-
* Gives SFTP connection info for this environment
989-
*
990-
* @params string $purpose The purpose of the connection info. This is used to
991-
* determine whether it should be returned for EVCS sites or not.
992-
*
993-
* @return array
988+
* Gives sftp connection info for this environment.
994989
*/
995-
public function sftpConnectionInfo($purpose = 'general')
996-
{
997-
if ($this->isEvcsSite() && $purpose !== "ssh") {
990+
public function sftpConnectionInfo() {
991+
if ($this->isEvcsSite()) {
998992
// No SFTP for EVCS sites
999993
return [];
1000994
}
995+
return $this->sshConnectionInfo();
996+
}
997+
998+
/**
999+
* Gives ssh connection info for this environment
1000+
*
1001+
* @return array
1002+
*/
1003+
public function sshConnectionInfo()
1004+
{
10011005
$site = $this->getSite();
10021006
if (!empty($ssh_host = $this->getConfig()->get('ssh_host'))) {
10031007
$username = "appserver.{$this->id}.{$site->id}";

0 commit comments

Comments
 (0)