Push update.
This commit is contained in:
@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user