From 827aa05a676e5973e93b294cccc604aa8dbfefa7 Mon Sep 17 00:00:00 2001 From: J Rhodes Date: Fri, 19 Jun 2015 15:05:39 +1000 Subject: [PATCH] Drop Windows-specific SSH code Summary: Ref T2015. This code is only relevant when attempting to run commands on a Windows host over SSH. Since SSH on Windows is extremely fragile and hard to maintain, and WinRM is a better long-term solution, drop this code (which will end up being unused when later diffs introduce the WinRM command interface). Test Plan: This code won't be used when D10495 lands. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Projects: #drydock Maniphest Tasks: T2015 Differential Revision: https://secure.phabricator.com/D13340 --- .../command/DrydockSSHCommandInterface.php | 42 +------------------ 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php index 362e60e3c0..d75dcfb780 100644 --- a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php +++ b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php @@ -42,46 +42,8 @@ final class DrydockSSHCommandInterface extends DrydockCommandInterface { $this->openCredentialsIfNotOpen(); $argv = func_get_args(); - - if ($this->getConfig('platform') === 'windows') { - // Handle Windows by executing the command under PowerShell. - $command = id(new PhutilCommandString($argv)) - ->setEscapingMode(PhutilCommandString::MODE_POWERSHELL); - - $change_directory = ''; - if ($this->getWorkingDirectory() !== null) { - $change_directory .= 'cd '.$this->getWorkingDirectory(); - } - - $script = <<applyWorkingDirectoryToArgv($argv); - - $full_command = call_user_func_array('csprintf', $argv); - } + $argv = $this->applyWorkingDirectoryToArgv($argv); + $full_command = call_user_func_array('csprintf', $argv); $command_timeout = ''; if ($this->connectTimeout !== null) {