From c9dd1067bbd5598f51659864c5a7fe8f470c5323 Mon Sep 17 00:00:00 2001 From: chrisghill Date: Fri, 11 Sep 2026 18:54:50 -0600 Subject: [PATCH] Fix errors caused by merging of last 2 PRs --- cmd/repository.go | 10 +++++----- cmd/resource.go | 10 +++++----- docs/generated/mass_repository_grant.md | 6 ++++++ docs/generated/mass_repository_grant_create.md | 6 ++++++ docs/generated/mass_repository_grant_delete.md | 6 ++++++ docs/generated/mass_repository_grant_list.md | 6 ++++++ docs/generated/mass_resource_grant.md | 6 ++++++ docs/generated/mass_resource_grant_create.md | 6 ++++++ docs/generated/mass_resource_grant_delete.md | 6 ++++++ docs/generated/mass_resource_grant_list.md | 6 ++++++ 10 files changed, 58 insertions(+), 10 deletions(-) diff --git a/cmd/repository.go b/cmd/repository.go index 9a5039e..c628a16 100644 --- a/cmd/repository.go +++ b/cmd/repository.go @@ -447,7 +447,7 @@ func newRepositoryGrantCmd() *cobra.Command { Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true - return runRepositoryGrantCreate(args[0], &createInput) + return runRepositoryGrantCreate(cmd, args[0], &createInput) }, } repositoryGrantCreateCmd.Flags().StringArrayVar(&createInput.conditions, "condition", nil, "Recipient project attribute condition; repeat a key to accept a set of values, or write key=* to accept any value") @@ -480,7 +480,7 @@ func newRepositoryGrantCmd() *cobra.Command { return repositoryGrantCmd } -func runRepositoryGrantCreate(name string, input *repositoryGrantCreateInput) error { +func runRepositoryGrantCreate(cmd *cobra.Command, name string, input *repositoryGrantCreateInput) error { ctx := context.Background() action, err := grants.ResolveRepoAction(input.action) @@ -492,7 +492,7 @@ func runRepositoryGrantCreate(name string, input *repositoryGrantCreateInput) er return err } - mdClient, err := massdriver.NewClient() + mdClient, err := newMassdriverClient(cmd) if err != nil { return fmt.Errorf("error initializing massdriver client: %w", err) } @@ -520,7 +520,7 @@ func runRepositoryGrantList(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true - mdClient, err := massdriver.NewClient() + mdClient, err := newMassdriverClient(cmd) if err != nil { return fmt.Errorf("error initializing massdriver client: %w", err) } @@ -539,7 +539,7 @@ func runRepositoryGrantDelete(cmd *cobra.Command, args []string) error { return validateErr } - mdClient, err := massdriver.NewClient() + mdClient, err := newMassdriverClient(cmd) if err != nil { return fmt.Errorf("error initializing massdriver client: %w", err) } diff --git a/cmd/resource.go b/cmd/resource.go index cb9fcf7..da57ffc 100644 --- a/cmd/resource.go +++ b/cmd/resource.go @@ -450,7 +450,7 @@ func newResourceGrantCmd() *cobra.Command { Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true - return runResourceGrantCreate(args[0], &createInput) + return runResourceGrantCreate(cmd, args[0], &createInput) }, } resourceGrantCreateCmd.Flags().StringArrayVar(&createInput.conditions, "condition", nil, "Recipient environment attribute condition; repeat a key to accept a set of values, or write key=* to accept any value") @@ -483,7 +483,7 @@ func newResourceGrantCmd() *cobra.Command { return resourceGrantCmd } -func runResourceGrantCreate(resourceID string, input *resourceGrantCreateInput) error { +func runResourceGrantCreate(cmd *cobra.Command, resourceID string, input *resourceGrantCreateInput) error { ctx := context.Background() action, err := grants.ResolveResourceAction(input.action) @@ -495,7 +495,7 @@ func runResourceGrantCreate(resourceID string, input *resourceGrantCreateInput) return err } - mdClient, err := massdriver.NewClient() + mdClient, err := newMassdriverClient(cmd) if err != nil { return fmt.Errorf("error initializing massdriver client: %w", err) } @@ -523,7 +523,7 @@ func runResourceGrantList(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true - mdClient, err := massdriver.NewClient() + mdClient, err := newMassdriverClient(cmd) if err != nil { return fmt.Errorf("error initializing massdriver client: %w", err) } @@ -542,7 +542,7 @@ func runResourceGrantDelete(cmd *cobra.Command, args []string) error { return validateErr } - mdClient, err := massdriver.NewClient() + mdClient, err := newMassdriverClient(cmd) if err != nil { return fmt.Errorf("error initializing massdriver client: %w", err) } diff --git a/docs/generated/mass_repository_grant.md b/docs/generated/mass_repository_grant.md index 50e6634..410f089 100644 --- a/docs/generated/mass_repository_grant.md +++ b/docs/generated/mass_repository_grant.md @@ -38,6 +38,12 @@ mass repository grant delete -h, --help help for grant ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass repository](/cli/commands/mass_repository) - Manage OCI repositories (bundles and resource types) diff --git a/docs/generated/mass_repository_grant_create.md b/docs/generated/mass_repository_grant_create.md index 5f4f3d8..e55d312 100644 --- a/docs/generated/mass_repository_grant_create.md +++ b/docs/generated/mass_repository_grant_create.md @@ -83,6 +83,12 @@ mass repository grant create [flags] -h, --help help for create ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass repository grant](/cli/commands/mass_repository_grant) - Manage sharing grants on an OCI repository diff --git a/docs/generated/mass_repository_grant_delete.md b/docs/generated/mass_repository_grant_delete.md index 502ce0e..dc1618e 100644 --- a/docs/generated/mass_repository_grant_delete.md +++ b/docs/generated/mass_repository_grant_delete.md @@ -44,6 +44,12 @@ mass repository grant delete [flags] -h, --help help for delete ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass repository grant](/cli/commands/mass_repository_grant) - Manage sharing grants on an OCI repository diff --git a/docs/generated/mass_repository_grant_list.md b/docs/generated/mass_repository_grant_list.md index 4d5d85e..6503591 100644 --- a/docs/generated/mass_repository_grant_list.md +++ b/docs/generated/mass_repository_grant_list.md @@ -53,6 +53,12 @@ mass repository grant list [flags] -o, --output string Output format (table, json) (default "table") ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass repository grant](/cli/commands/mass_repository_grant) - Manage sharing grants on an OCI repository diff --git a/docs/generated/mass_resource_grant.md b/docs/generated/mass_resource_grant.md index c3bf533..3d8bccd 100644 --- a/docs/generated/mass_resource_grant.md +++ b/docs/generated/mass_resource_grant.md @@ -38,6 +38,12 @@ mass resource grant delete -h, --help help for grant ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass resource](/cli/commands/mass_resource) - Manage resources diff --git a/docs/generated/mass_resource_grant_create.md b/docs/generated/mass_resource_grant_create.md index 1cbd8d7..c2210ce 100644 --- a/docs/generated/mass_resource_grant_create.md +++ b/docs/generated/mass_resource_grant_create.md @@ -84,6 +84,12 @@ mass resource grant create [flags] -h, --help help for create ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass resource grant](/cli/commands/mass_resource_grant) - Manage sharing grants on a resource diff --git a/docs/generated/mass_resource_grant_delete.md b/docs/generated/mass_resource_grant_delete.md index b96fa52..9823703 100644 --- a/docs/generated/mass_resource_grant_delete.md +++ b/docs/generated/mass_resource_grant_delete.md @@ -44,6 +44,12 @@ mass resource grant delete [flags] -h, --help help for delete ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass resource grant](/cli/commands/mass_resource_grant) - Manage sharing grants on a resource diff --git a/docs/generated/mass_resource_grant_list.md b/docs/generated/mass_resource_grant_list.md index d08c862..5b4faa9 100644 --- a/docs/generated/mass_resource_grant_list.md +++ b/docs/generated/mass_resource_grant_list.md @@ -53,6 +53,12 @@ mass resource grant list [flags] -o, --output string Output format (table, json) (default "table") ``` +### Options inherited from parent commands + +``` + --profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile) +``` + ### SEE ALSO * [mass resource grant](/cli/commands/mass_resource_grant) - Manage sharing grants on a resource