Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure return code non-zero on cli error #3499

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

hwine
Copy link
Contributor

@hwine hwine commented Jan 18, 2025

After inspection, only the shell_completion did not use click methods to report errors. Fixed and added/updated tests for both internally detected errors.

📝 Summary

Fixes #3476

🔍 Description of Changes

After code inspection, only the shell_completion did not use click methods to report errors. Fixed and added/updated tests for both internally detected errors.

❯ pytest -p no:warnings tests/_cli/test_cli.py::test_shell_completion
===================================================== test session starts =====================================================
platform win32 -- Python 3.13.0, pytest-8.3.4, pluggy-1.5.0
rootdir: C:\Users\hwine\marimo
configfile: pyproject.toml
plugins: anyio-4.8.0
collected 6 items

tests\_cli\test_cli.py ......                                                                                            [100%]

===================================================== 6 passed in 14.19s ======================================================

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

📜 Reviewers

@mscolnick

After inspection, only the `shell_completion` did not use click methods
to report errors. Fixed and added/updated tests for both internally
detected errors.
Copy link

vercel bot commented Jan 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2025 7:10pm

Copy link

vercel bot commented Jan 18, 2025

@hwine is attempting to deploy a commit to the marimo Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

nice work! thank you

@mscolnick mscolnick merged commit 1d64298 into marimo-team:main Jan 18, 2025
29 of 31 checks passed
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.10.15-dev6

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.

Invalid cli arguments do not cause marimo to return a non-zero exit status
2 participants