Skip to content

Commit

Permalink
revbump: improve an error message
Browse files Browse the repository at this point in the history
Suggested by gdt
  • Loading branch information
0-wiz-0 committed Jan 18, 2024
1 parent 35fc569 commit 00cd539
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgtools/revbump/files/revbump.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# $NetBSD: revbump.py,v 1.6 2023/12/29 21:23:40 adam Exp $
# $NetBSD: revbump.py,v 1.7 2024/01/18 10:11:55 wiz Exp $
#
# Copyright (c) 2023 The NetBSD Foundation, Inc.
# All rights reserved.
Expand Down Expand Up @@ -207,6 +207,9 @@ def relative_path(full_path):
if args.package == 'lang/go':
searchlist = ['lang/go/version.mk']
else:
if not pathlib.Path(args.pkgsrcdir + '/' + args.package.rstrip('/')).exists():
print(f'directory {args.package} does not exist or is not a pkgsrc directory')
sys.exit(1)
initial_bl3 = args.package.rstrip('/') + '/buildlink3.mk'
if not pathlib.Path(args.pkgsrcdir + '/' + initial_bl3).exists():
print(f'package {args.package} provides no buildlink3.mk file')
Expand Down

0 comments on commit 00cd539

Please sign in to comment.