Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

shell: rename -force to -apply in s3.iam.import for consistency

Chris Lufb0573ffc4e1
diff --git a/weed/shell/command_s3_iam_import.go b/weed/shell/command_s3_iam_import.go
index 1b47f528ed..6d4d00c9f4 100644
--- a/weed/shell/command_s3_iam_import.go
+++ b/weed/shell/command_s3_iam_import.go
@@ -28,12 +28,12 @@ func (c *commandS3IAMImport) Name() string {
func (c *commandS3IAMImport) Help() string {
return `import S3 IAM configuration from a JSON file
- s3.iam.import -file backup.json -force
+ s3.iam.import -file backup.json -apply
Replaces the entire IAM configuration (users, credentials, policies,
service accounts, groups) with the contents of the file.
- Requires -force to confirm, since this overwrites the current configuration.
+ Requires -apply to confirm, since this overwrites the current configuration.
`
}
@@ -44,7 +44,7 @@ func (c *commandS3IAMImport) HasTag(CommandTag) bool {
func (c *commandS3IAMImport) Do(args []string, commandEnv *CommandEnv, writer io.Writer) error {
f := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
file := f.String("file", "", "input JSON file")
- force := f.Bool("force", false, "confirm overwrite of the entire IAM configuration")
+ apply := f.Bool("apply", false, "confirm overwrite of the entire IAM configuration")
if err := f.Parse(args); err != nil {
return err
}
@@ -52,8 +52,8 @@ func (c *commandS3IAMImport) Do(args []string, commandEnv *CommandEnv, writer io
if *file == "" {
return fmt.Errorf("-file is required")
}
- if !*force {
- return fmt.Errorf("this overwrites the entire IAM configuration; use -force to confirm")
+ if !*apply {
+ return fmt.Errorf("this overwrites the entire IAM configuration; use -apply to confirm")
}
data, err := os.ReadFile(*file)