Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cmd: improve error messages for missing model name#14465

Open
Anandesh-Sharma wants to merge 1 commit intoollama:mainfrom
Anandesh-Sharma:fix-cli-error-messages
Open

cmd: improve error messages for missing model name#14465
Anandesh-Sharma wants to merge 1 commit intoollama:mainfrom
Anandesh-Sharma:fix-cli-error-messages

Conversation

@Anandesh-Sharma
Copy link

Summary

  • Replaces generic accepts 1 arg(s), received 0 with descriptive missing model name error for create, show, stop, pull, and push commands
  • Improves cp command to show missing source and/or destination model name instead of accepts 2 arg(s), received 0
  • Also reports extra arguments when too many args are passed

Before

$ ollama show
Error: accepts 1 arg(s), received 0

After

$ ollama show
Error: missing model name

Fixes #2893

Replace generic "accepts 1 arg(s), received 0" with descriptive
"missing model name" errors for create, show, stop, pull, push,
and cp commands.

Fixes ollama#2893

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.

Improve error messages for missing arguments

1 participant