Skip to content

fix(plugin): align empty name errors#343

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-plugin-empty-name-error
Open

fix(plugin): align empty name errors#343
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-plugin-empty-name-error

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53115.

Changes:

  • Uses one shared empty plugin-name validation path for plugin install and plugin new.
  • Keeps the error text consistent: Plugin name cannot be empty.
  • Treats whitespace-only plugin new names as empty, matching install behavior.
  • Adds a regression test covering both command paths.
  • Fixes a stale test import so the cortex-cli test target builds on current main.

Validation:

  • cargo +stable fmt --package cortex-cli --check
  • cargo +stable test --package cortex-cli plugin_cmd::tests::test_plugin_install_and_new_empty_name_errors_match -- --nocapture
  • cargo +stable check --package cortex-cli --lib
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.7] cortex plugin install and plugin new show inconsistent error messages for empty plugin name

1 participant