Skip to content

Commit 42eef33

Browse files
committed
Add new purpose param to sftpConnectionInfo function.
1 parent 7639496 commit 42eef33

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
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();
379+
$sftp = $this->environment->sftpConnectionInfo('ssh');
380380
$command = $this->getConfig()->get('ssh_command');
381381
if ($this->output()->isDebug()) {
382382
$command .= ' -vvv';

src/Models/Environment.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,11 +987,14 @@ public function setHttpsCertificate($certificate = [])
987987
/**
988988
* Gives SFTP connection info for this environment
989989
*
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+
*
990993
* @return array
991994
*/
992-
public function sftpConnectionInfo()
995+
public function sftpConnectionInfo($purpose = 'general')
993996
{
994-
if ($this->isEvcsSite()) {
997+
if ($this->isEvcsSite() && $purpose !== "ssh") {
995998
// No SFTP for EVCS sites
996999
return [];
9971000
}

0 commit comments

Comments
 (0)