1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Set the working directory when providing SSH / SFTP interfaces

Summary: Ref T1049.  Set the working directory when executing commands on Drydock hosts.  Without this set, they execute in the user's default home directory.

Test Plan: Ran a build and saw the correct working directory when running `pwd`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: CanadianBadass, epriestley, Korvin

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D10293
This commit is contained in:
James Rhodes 2014-08-22 14:40:31 +10:00
parent 34a90a0d2b
commit 2a4a30044b

View file

@ -108,13 +108,15 @@ final class DrydockPreallocatedHostBlueprintImplementation
'host' => $resource->getAttribute('host'),
'port' => $resource->getAttribute('port'),
'credential' => $resource->getAttribute('credential'),
'platform' => $resource->getAttribute('platform')));
'platform' => $resource->getAttribute('platform')))
->setWorkingDirectory($lease->getAttribute('path'));
case 'filesystem':
return id(new DrydockSFTPFilesystemInterface())
->setConfiguration(array(
'host' => $resource->getAttribute('host'),
'port' => $resource->getAttribute('port'),
'credential' => $resource->getAttribute('credential')));
'credential' => $resource->getAttribute('credential')))
->setWorkingDirectory($lease->getAttribute('path'));
}
throw new Exception("No interface of type '{$type}'.");