Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pipreqs/pipreqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ def init(args):
encoding = "utf-8"
if input_path is None:
input_path = os.path.abspath(os.curdir)
if not os.path.isdir(input_path):
logging.error(f"The path '{input_path}' is not a directory. Please provide a directory path.")
sys.exit(1)

if extra_ignore_dirs:
extra_ignore_dirs = extra_ignore_dirs.split(",")
Expand Down