Page MenuHomePhabricator

Execute commands under Powershell on Windows for Harbormaster
ClosedPublic

Authored by hach-que on Aug 13 2014, 1:01 AM.
Tags
None
Referenced Files
F13085579: D10248.diff
Wed, Apr 24, 11:51 PM
Unknown Object (File)
Sun, Apr 21, 7:41 PM
Unknown Object (File)
Thu, Apr 11, 8:06 AM
Unknown Object (File)
Sun, Apr 7, 5:10 PM
Unknown Object (File)
Sat, Apr 6, 8:49 AM
Unknown Object (File)
Sat, Apr 6, 2:22 AM
Unknown Object (File)
Mon, Apr 1, 12:09 PM
Unknown Object (File)
Sun, Mar 31, 5:53 PM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hach-que retitled this revision from to Execute commands under Powershell on Windows for Harbormaster.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
hach-que edited edge metadata.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Aug 13 2014, 1:09 AM
hach-que edited edge metadata.

For reference (not landing yet)

Yep, looks fine.

src/applications/harbormaster/step/HarbormasterCommandBuildStepImplementation.php
23

maybe array typehint

hach-que updated this revision to Diff 24674.

Closed by commit rPddacb03be660 (authored by @hach-que).