mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-26 19:04:32 +02:00
Do not allow --drop without --output or --multi
This commit is contained in:
parent
dfed7ad18a
commit
5839ddb490
1 changed files with 2 additions and 0 deletions
|
|
@ -1987,6 +1987,8 @@ def convert(
|
|||
raise click.ClickException("Cannot use --output with more than one column")
|
||||
if multi and len(columns) > 1:
|
||||
raise click.ClickException("Cannot use --multi with more than one column")
|
||||
if drop and not (output or multi):
|
||||
raise click.ClickException("--drop can only be used with --output or --multi")
|
||||
# If single line and no 'return', add the return
|
||||
if "\n" not in code and not code.strip().startswith("return "):
|
||||
code = "return {}".format(code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue