Page MenuHomePhabricator

D10377.id24976.diff
No OneTemporary

D10377.id24976.diff

diff --git a/src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php
--- a/src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php
+++ b/src/applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php
@@ -128,7 +128,14 @@
DrydockResource $resource,
DrydockLease $lease) {
- // TODO: Remove leased directory
+ $cmd = $lease->getInterface('command');
+ $path = $lease->getAttribute('path');
+
+ if ($resource->getAttribute('platform') !== 'windows') {
+ $cmd->execx('rm -rf %s', $path);
+ } else {
+ $cmd->execx('rm -Recurse -Force %s', $path);
+ }
}
protected function shouldCloseUnleasedResource(

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 14, 1:05 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7713477
Default Alt Text
D10377.id24976.diff (816 B)

Event Timeline