mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
docs: use the term backend name instead of fs name for authorize command
This commit is contained in:
committed by
Nick Craig-Wood
parent
b5ba737e14
commit
089c4b1a69
@@ -23,7 +23,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var commandDefinition = &cobra.Command{
|
var commandDefinition = &cobra.Command{
|
||||||
Use: "authorize <fs name> [base64_json_blob | client_id client_secret]",
|
Use: "authorize <backendname> [base64_json_blob | client_id client_secret]",
|
||||||
Short: `Remote authorization.`,
|
Short: `Remote authorization.`,
|
||||||
Long: `Remote authorization. Used to authorize a remote or headless
|
Long: `Remote authorization. Used to authorize a remote or headless
|
||||||
rclone from a machine with a browser - use as instructed by
|
rclone from a machine with a browser - use as instructed by
|
||||||
@@ -31,7 +31,7 @@ rclone config.
|
|||||||
|
|
||||||
The command requires 1-3 arguments:
|
The command requires 1-3 arguments:
|
||||||
|
|
||||||
- fs name (e.g., "drive", "s3", etc.)
|
- Name of a backend (e.g. "drive", "s3")
|
||||||
- Either a base64 encoded JSON blob obtained from a previous rclone config session
|
- Either a base64 encoded JSON blob obtained from a previous rclone config session
|
||||||
- Or a client_id and client_secret pair obtained from the remote service
|
- Or a client_id and client_secret pair obtained from the remote service
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
func TestAuthorizeCommand(t *testing.T) {
|
func TestAuthorizeCommand(t *testing.T) {
|
||||||
// Test that the Use string is correctly formatted
|
// Test that the Use string is correctly formatted
|
||||||
if commandDefinition.Use != "authorize <fs name> [base64_json_blob | client_id client_secret]" {
|
if commandDefinition.Use != "authorize <backendname> [base64_json_blob | client_id client_secret]" {
|
||||||
t.Errorf("Command Use string doesn't match expected format: %s", commandDefinition.Use)
|
t.Errorf("Command Use string doesn't match expected format: %s", commandDefinition.Use)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ func TestAuthorizeCommand(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
helpOutput := buf.String()
|
helpOutput := buf.String()
|
||||||
if !strings.Contains(helpOutput, "authorize <fs name>") {
|
if !strings.Contains(helpOutput, "authorize <backendname>") {
|
||||||
t.Errorf("Help output doesn't contain correct usage information")
|
t.Errorf("Help output doesn't contain correct usage information")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
//
|
//
|
||||||
// It expects 1, 2 or 3 arguments
|
// It expects 1, 2 or 3 arguments
|
||||||
//
|
//
|
||||||
// rclone authorize "fs name"
|
// rclone authorize "backend name"
|
||||||
// rclone authorize "fs name" "base64 encoded JSON blob"
|
// rclone authorize "backend name" "base64 encoded JSON blob"
|
||||||
// rclone authorize "fs name" "client id" "client secret"
|
// rclone authorize "backend name" "client id" "client secret"
|
||||||
func Authorize(ctx context.Context, args []string, noAutoBrowser bool, templateFile string) error {
|
func Authorize(ctx context.Context, args []string, noAutoBrowser bool, templateFile string) error {
|
||||||
ctx = suppressConfirm(ctx)
|
ctx = suppressConfirm(ctx)
|
||||||
ctx = fs.ConfigOAuthOnly(ctx)
|
ctx = fs.ConfigOAuthOnly(ctx)
|
||||||
|
|||||||
Reference in New Issue
Block a user