Fixed bug with --no-headers --tsv, closes #295

This commit is contained in:
Simon Willison 2021-08-18 13:18:54 -07:00
commit 7e2dcbbbea
2 changed files with 10 additions and 8 deletions

View file

@ -720,7 +720,7 @@ def insert_upsert_implementation(
):
db = sqlite_utils.Database(path)
_load_extensions(db, load_extension)
if delimiter or quotechar or sniff or no_headers:
if (delimiter or quotechar or sniff or no_headers) and not tsv:
csv = True
if (nl + csv + tsv) >= 2:
raise click.ClickException("Use just one of --nl, --csv or --tsv")