diff --git a/tools/mconnect/commands/export/export.go b/tools/mconnect/commands/export/export.go index ffbea4a..7de652c 100644 --- a/tools/mconnect/commands/export/export.go +++ b/tools/mconnect/commands/export/export.go @@ -239,6 +239,9 @@ By default it will be assumed that the project and region used for Migration Cen return messages.NoArgumentsAcceptedError{Args: args}.Error() } + // Remove usage printing on error once initial parameter validations are done. + cmd.SilenceUsage = true + if datasetID == "" { datasetID = defaultDatasetID } diff --git a/tools/mconnect/commands/groups/groups.go b/tools/mconnect/commands/groups/groups.go index e35e3af..bfad057 100644 --- a/tools/mconnect/commands/groups/groups.go +++ b/tools/mconnect/commands/groups/groups.go @@ -183,6 +183,9 @@ func NewCreateGroupsCmd(factory groupCreatorFactory) *cobra.Command { return messages.NoArgumentsAcceptedError{Args: args}.Error() } + // Remove usage printing on error once initial parameter validations are done. + cmd.SilenceUsage = true + fmt.Println(messages.ParsingFile{FilePath: path}) groups, err := parser.Groups(path) if err != nil { diff --git a/tools/mconnect/commands/views/views.go b/tools/mconnect/commands/views/views.go index d1bfcdd..b228f08 100644 --- a/tools/mconnect/commands/views/views.go +++ b/tools/mconnect/commands/views/views.go @@ -137,6 +137,9 @@ mconnect create-views --project=my-project-id --dataset=dataset-id --force=true` return messages.NoArgumentsAcceptedError{Args: args}.Error() } + // Remove usage printing on error once initial parameter validations are done. + cmd.SilenceUsage = true + vc := factory.build(projectID, datasetID) viewsMetadata := []viewMetadata{ newViewMetadata(mcViewName, "mc view description", mcQuery(projectID, datasetID)),