1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 02:23:24 +00:00

rc: config/listremotes include from env vars

Fixes: 
#6540

Discussed:
https://forum.rclone.org/t/environment-variable-config-not-used-for-remote-control/39014
This commit is contained in:
kapitainsky
2023-06-25 11:27:42 +01:00
committed by Nick Craig-Wood
parent 8274712c2c
commit 7751d5a00b
2 changed files with 9 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ func init() {
rc.Add(rc.Call{
Path: "config/listremotes",
Fn: rcListRemotes,
Title: "Lists the remotes in the config file.",
Title: "Lists the remotes in the config file and defined in environment variables.",
AuthRequired: true,
Help: `
Returns
@@ -71,8 +71,9 @@ See the [listremotes](/commands/rclone_listremotes/) command for more informatio
}
// Return the a list of remotes in the config file
// including any defined by environment variables.
func rcListRemotes(ctx context.Context, in rc.Params) (out rc.Params, err error) {
remotes := LoadedData().GetSectionList()
remotes := FileSections()
out = rc.Params{
"remotes": remotes,
}