Homec4science

Execute commands under Powershell on Windows for Harbormaster

Authored by James Rhodes <jrhodes@redpointsoftware.com.au> on Aug 13 2014, 04:48.

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

Details

Committed
James Rhodes <jrhodes@redpointsoftware.com.au>Aug 13 2014, 04:48
Pushed
aubortJan 31 2017, 17:16
Parents
rPH8ef1ea63ddb9: Add "unblock" and "column" mail tags to Maniphest
Branches
Unknown
Tags
Unknown

Event Timeline

James Rhodes <jrhodes@redpointsoftware.com.au> committed rPHca8f7cdaa59a: Execute commands under Powershell on Windows for Harbormaster (authored by James Rhodes <jrhodes@redpointsoftware.com.au>).Aug 13 2014, 04:48