Skip to content

fix: resource cmd with no args panics#63

Merged
gianarb merged 1 commit into
mainfrom
fix/resource-cmd-with-no-args
Jan 20, 2026
Merged

fix: resource cmd with no args panics#63
gianarb merged 1 commit into
mainfrom
fix/resource-cmd-with-no-args

Conversation

@gianarb

@gianarb gianarb commented Jan 16, 2026

Copy link
Copy Markdown
Collaborator

The logic I wrote to remap some resources to something else
(organization membership to organization) for "resource commands" (like
get, delete, edit) does not cover the use case where the first argument
is omitted so it panics.

For example:

datumctl get

panic

With this fix it fallback to what the underline get command does (fails
with a nice error)

@gianarb
gianarb requested a review from scotwells January 16, 2026 15:44
Comment thread internal/cmd/utils.go
The logic I wrote to remap some resources to something else
(organization membership to organization) for "resource commands" (like
get, delete, edit) does not cover the use case where the first argument
is omitted so it panics.

For example:

```
datumctl get

panic
```

With this fix it fallback to what the underline get command does (fails
with a nice error)
@gianarb
gianarb force-pushed the fix/resource-cmd-with-no-args branch from 9105fd6 to f4e87bb Compare January 19, 2026 13:14
@gianarb
gianarb requested a review from scotwells January 19, 2026 14:02
@gianarb
gianarb enabled auto-merge January 19, 2026 16:39
@gianarb
gianarb merged commit 09a37fc into main Jan 20, 2026
2 checks passed
@gianarb
gianarb deleted the fix/resource-cmd-with-no-args branch January 20, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants