Skip to content

Commit

Permalink
revert argument changes
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed Mar 6, 2020
1 parent 4093c2f commit b22f89e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/config-host-add.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ EXAMPLES:
}

// checkConfigHostAddSyntax - verifies input arguments to 'config host add'.
func checkConfigHostAddSyntax(ctx *cli.Context, accessKey, secretKey, api, bucketLookup string) {
func checkConfigHostAddSyntax(ctx *cli.Context, accessKey string, secretKey string) {
args := ctx.Args()
argsNr := len(args)
if argsNr > 4 || argsNr < 2 {
Expand All @@ -102,6 +102,8 @@ func checkConfigHostAddSyntax(ctx *cli.Context, accessKey, secretKey, api, bucke

alias := args.Get(0)
url := args.Get(1)
api := ctx.String("api")
bucketLookup := ctx.String("lookup")

if !isValidAlias(alias) {
fatalIf(errInvalidAlias(alias), "Invalid alias.")
Expand Down Expand Up @@ -274,7 +276,7 @@ func mainConfigHostAdd(ctx *cli.Context) error {
lookup = ctx.String("lookup")
)
accessKey, secretKey := fetchHostKeys(args)
checkConfigHostAddSyntax(ctx, accessKey, secretKey, api, lookup)
checkConfigHostAddSyntax(ctx, accessKey, secretKey)

s3Config, err := buildS3Config(url, accessKey, secretKey, api, lookup)
fatalIf(err.Trace(ctx.Args()...), "Unable to initialize new config from the provided credentials.")
Expand Down

0 comments on commit b22f89e

Please sign in to comment.