What was wrong: an rclone destination whose remote is defined only in the file RCLONE_CONFIG names failed with "rclone remote not found in config". rclone reads that variable only as the value of its --config flag. vaultik does not have that flag, so it always read rclone's default config file.
What changed:NewRcloneStorer now sets rclone's config file path from RCLONE_CONFIG whenever the variable is set, as the --config flag would. This happens before the config is loaded. A new test writes a config file defining a local remote, points RCLONE_CONFIG at it, and checks that a Put through that remote lands in the remote's directory.
Not obvious from the diff:
An empty RCLONE_CONFIG is applied too. rclone takes it to mean no config file (an in-memory config), and vaultik now does the same rather than falling back to the default file.
rclone keeps the config file path in a process-wide variable, so the new test puts the previous path back when it finishes.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/321.
**What was wrong:** an rclone destination whose remote is defined only in the file `RCLONE_CONFIG` names failed with "rclone remote not found in config". rclone reads that variable only as the value of its `--config` flag. vaultik does not have that flag, so it always read rclone's default config file.
**What changed:** `NewRcloneStorer` now sets rclone's config file path from `RCLONE_CONFIG` whenever the variable is set, as the `--config` flag would. This happens before the config is loaded. A new test writes a config file defining a `local` remote, points `RCLONE_CONFIG` at it, and checks that a `Put` through that remote lands in the remote's directory.
**Not obvious from the diff:**
- An empty `RCLONE_CONFIG` is applied too. rclone takes it to mean no config file (an in-memory config), and vaultik now does the same rather than falling back to the default file.
- rclone keeps the config file path in a process-wide variable, so the new test puts the previous path back when it finishes.
Model: opus-5-5
An rclone destination whose remote is defined only in the file
RCLONE_CONFIG names was reported as not found: rclone reads that
variable only as the value of its --config flag, which vaultik does not
have, so vaultik always used rclone's default config file.
NewRcloneStorer now sets rclone's config path from RCLONE_CONFIG when
the variable is set, as that flag would, including an empty value,
which rclone takes to mean no config file.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #321.
What was wrong: an rclone destination whose remote is defined only in the file
RCLONE_CONFIGnames failed with "rclone remote not found in config". rclone reads that variable only as the value of its--configflag. vaultik does not have that flag, so it always read rclone's default config file.What changed:
NewRcloneStorernow sets rclone's config file path fromRCLONE_CONFIGwhenever the variable is set, as the--configflag would. This happens before the config is loaded. A new test writes a config file defining alocalremote, pointsRCLONE_CONFIGat it, and checks that aPutthrough that remote lands in the remote's directory.Not obvious from the diff:
RCLONE_CONFIGis applied too. rclone takes it to mean no config file (an in-memory config), and vaultik now does the same rather than falling back to the default file.Model: opus-5-5
Review passed.
Model: opus-5-5