Skip to content

Commit

Permalink
Adding a check for file in convert cli. Earliar it used to raise long…
Browse files Browse the repository at this point in the history
… error
  • Loading branch information
xeniumcode committed Mar 7, 2025
1 parent 40d58da commit 1e830f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions marimo/_cli/convert/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def convert(
you may need to fix errors like multiple definition errors or cycle
errors.
"""
if not Path(filename).exists():
raise click.FileError(filename, "File does not exist")

ext = Path(filename).suffix
if ext not in (".ipynb", ".md", ".qmd"):
raise click.UsageError("File must be an .ipynb or .md file")
Expand Down

0 comments on commit 1e830f7

Please sign in to comment.