Skip to content

Commit

Permalink
Cleanup temp files after snapshot copies
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobSanford committed Jun 17, 2024
1 parent 590f4a7 commit 72222a7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Robo/Plugin/Commands/DaemonSnapshotCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,27 @@ public function installSnapshot(
$tmp_path,
$options['target-env']
);
// Remove the local tmp archive files.
$this->executeCliCommand(
['rm', '-rf', "$tmp_path/*.gz"],
$this->dockworkerIO,
null,
'',
'Remove Local Archive Files',
false,
null
);
$this->executeImportScript($container);
// Now, delete any remaining files in the container dir.
$this->executeContainerCommand(
$options['target-env'],
['rm', '-rf', '/tmp/snapshot'],
$this->dockworkerIO,
'',
'Remove Container Archive Files',
false,
false
);
}
}

Expand Down

0 comments on commit 72222a7

Please sign in to comment.