Skip to content

fix: reject -f flag combined with a resource kind on create - #430

Merged
SaadAssaf merged 1 commit into
mainfrom
nctl_file_flagCheck_parentFix
Jul 15, 2026
Merged

fix: reject -f flag combined with a resource kind on create#430
SaadAssaf merged 1 commit into
mainfrom
nctl_file_flagCheck_parentFix

Conversation

@SaadAssaf

@SaadAssaf SaadAssaf commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

-f is now only allowed when doing nctl create -f as nctl create <type> -fdoesn't make any sense. A file already contains the types of its resources.

@thde thde changed the title reject -f flag combined with a resource kind on create fix: reject -f flag combined with a resource kind on create Jul 14, 2026
Comment thread create/create.go
@SaadAssaf

Copy link
Copy Markdown
Contributor Author

ticket: 1695

…nd apply subcommands

Defined -f on the file-based subcommand instead of the parent struct
so kind subcommands no longer inherit it.
switched the file subcommands default from "1" to "withargs" so
its still picked automatically when no kind is given.
@SaadAssaf
SaadAssaf force-pushed the nctl_file_flagCheck_parentFix branch from 01c5364 to 901e4e8 Compare July 15, 2026 11:48
@SaadAssaf
SaadAssaf merged commit b1a1db3 into main Jul 15, 2026
3 checks passed
@SaadAssaf
SaadAssaf deleted the nctl_file_flagCheck_parentFix branch July 15, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants