Push update.
Some checks failed
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/test Pipeline failed

This commit is contained in:
2025-04-01 14:09:39 +00:00
parent 580653bbea
commit 3f33729b4b
4 changed files with 11 additions and 3 deletions

View File

@ -28,8 +28,9 @@ final class Rclone
* But the path can be configured to be absolute.
*
* @param string $rclonePath Relative or absolute path
* @param string $rcloneConfig Relative or absolute path to the rclone config file
*/
public function __construct(protected LoggerInterface $logger, protected string $rclonePath = "rclone")
public function __construct(protected LoggerInterface $logger, protected string $rclonePath = "rclone", protected string $rcloneConfig = '')
{
$this->rclonePath = $rclonePath;
@ -112,9 +113,15 @@ final class Rclone
*/
private function exec(string $command, array $options = []): Process
{
$rcloneconfig = [];
if ($this->rcloneConfig != '') {
$rcloneconfig = ['--config', $this->rcloneConfig];
}
$process = new Process(
array_merge(
[$this->rclonePath],
$rcloneconfig,
[$command],
$options
)