Skip to content

Commit

Permalink
feat: added error message on missing sources list file
Browse files Browse the repository at this point in the history
  • Loading branch information
RonTamG committed Sep 13, 2023
1 parent a5711ca commit 57d9317
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,20 @@ def enable_ansi_espace_codes_on_windows():


def main():
args = create_parser().parse_args()
parser = create_parser()
args = parser.parse_args()
temp_folder = args.temp_folder
sources_list = args.sources_list
with_recommended = not args.no_recommended
with_dependencies = not args.no_dependencies
with_pre_dependencies = not args.no_pre_dependencies
with_required = args.with_required

if not Path(sources_list).exists():
parser.print_usage()
print(f"pyapt: error: the file {sources_list} is missing")
exit()

enable_ansi_espace_codes_on_windows()

index = apt_update(sources_list, temp_folder)
Expand Down

0 comments on commit 57d9317

Please sign in to comment.