HomePhabricator

Execute commands under Powershell on Windows for Harbormaster

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Execute commands under Powershell on Windows for Harbormaster

Summary:
Resolves T5831. This modifies the Drydock SSH interface to execute commands under Powershell when the target host platform is Windows. Powershell is far more featured than cmd.exe, and more closely resembles a UNIX shell.

Currently Powershell outputs stderr as an XML blob on a line, and while this code currently doesn't use that, it will allow us in the future (planned next week) to redirect that output to the stderr log instead of having it all merged in with stdout under cmd (where there is no way to distinguish it).

Test Plan:
Ran various native commands and PowerShell commands from a Harbormaster build, including things like:

Write-Host ("my test" + ${build.id})

and saw:

my test679

in the output.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5831

Differential Revision: https://secure.phabricator.com/D10248

Commit No Longer Exists

This commit no longer exists in the repository.