Skip to content

Commit

Permalink
Flags instead of PersistentFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbrose committed Dec 13, 2022
1 parent 57c53e6 commit 56006ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/codespace/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ func (c codespace) running() bool {
// which instructs the user to use -R instead.
func addDeprecatedRepoShorthand(cmd *cobra.Command, target *string) error {
cmd.Flags().StringVarP(target, "repo-deprecated", "r", "", "(Deprecated) Shorthand for --repo")
if err := cmd.PersistentFlags().MarkHidden("repo-deprecated"); err != nil {

if err := cmd.Flags().MarkHidden("repo-deprecated"); err != nil {
return fmt.Errorf("error marking `-r` shorthand as hidden: %w", err)
}

Expand Down

0 comments on commit 56006ee

Please sign in to comment.