"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
Add --auto-confirm flag
Substantiel77491575960d
diff --git a/fs/config.go b/fs/config.goindex 952dbaa5b..c23c02107 100644--- a/fs/config.go+++ b/fs/config.go@@ -104,6 +104,7 @@ var (disableFeatures = StringP("disable", "", "", "Disable a comma separated list of features. Use help to see a list.")userAgent = StringP("user-agent", "", "rclone/"+Version, "Set the user-agent to a specified string. The default is rclone/ version")immutable = BoolP("immutable", "", false, "Do not modify files. Fail if existing files have been modified.")+ autoConfirm = BoolP("auto-confirm", "", false, "If enabled, do not request console confirmation.")streamingUploadCutoff = SizeSuffix(100 * 1024)logLevel = LogLevelNoticestatsLogLevel = LogLevelInfo@@ -243,6 +244,7 @@ type ConfigInfo struct {BindAddr net.IPDisableFeatures []stringImmutable bool+ AutoConfirm boolStreamingUploadCutoff SizeSuffix}@@ -383,6 +385,7 @@ func LoadConfig() {Config.TPSLimit = *tpsLimitConfig.TPSLimitBurst = *tpsLimitBurstConfig.Immutable = *immutable+ Config.AutoConfirm = *autoConfirmConfig.BufferSize = bufferSizeConfig.StreamingUploadCutoff = streamingUploadCutoff@@ -805,6 +808,9 @@ func Command(commands []string) byte {// Confirm asks the user for Yes or No and returns true or falsefunc Confirm() bool {+ if Config.AutoConfirm {+ return true+ }return Command([]string{"yYes", "nNo"}) == 'y'}@@ -1016,6 +1022,8 @@ func UpdateRemote(name string, keyValues []string) error {// parameters which are key, value pairs. If update is set then it// adds the new keys rather than replacing all of them.func CreateRemote(name string, provider string, keyValues []string) error {+ // Suppress Confirm+ Config.AutoConfirm = true// Delete the old config if it existsconfigData.DeleteSection(name)// Set the type