Skip to content

Commit

Permalink
fix: Prompt the user if additional input is expected in csvjoin, csvs…
Browse files Browse the repository at this point in the history
…ql and csvstack, closes #1169
  • Loading branch information
jpmckinney committed Oct 17, 2023
1 parent fb3a588 commit 4b29fe9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Unreleased
* :doc:`/scripts/csvstat` adds a :code:`--non-nulls` option to only output counts of non-null values.
* :doc:`/scripts/csvstat` adds a :code:`--max-precision` option to only output the most decimal places.
* feat: Add a :code:`--null-value` option to commands with the :code:`--blanks` option, to convert additional values to NULL.
* fix: Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in :doc:`/scripts/csvjoin` and :doc:`/scripts/csvstack`.
* fix: Prompt the user if additional input is expected (i.e. if no input file or piped data is provided) in :doc:`/scripts/csvjoin`, :doc:`/scripts/csvsql` and :doc:`/scripts/csvstack`.
* fix: No longer errors if a NUL byte occurs in an input file.
* Add Python 3.12 support.

Expand Down
2 changes: 1 addition & 1 deletion csvkit/utilities/csvsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def add_arguments(self):
help='Chunk size for batch insert into the table. Requires --insert.')

def main(self):
if isatty(sys.stdin) and not self.args.input_paths:
if isatty(sys.stdin) and self.args.input_paths == ['-']:
self.argparser.error('You must provide an input file or piped data.')

self.input_files = []
Expand Down

0 comments on commit 4b29fe9

Please sign in to comment.