Skip to content

Commit

Permalink
exit(1) if query does not return a result
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoldegrove committed Oct 22, 2024
1 parent 499d6af commit d70cf91
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bin/glrd
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ def main():
if release:
format_output(args, [release], args.output_format, args.fields, no_header=args.no_header)
else:
print("No active releases found.")
print("No latest release found.")
exit(1)
else:
# Display all filtered releases

format_output(args, releases, args.output_format, args.fields, no_header=args.no_header)
if releases:
# Display all filtered releases
format_output(args, releases, args.output_format, args.fields, no_header=args.no_header)
else:
print("No releases found.")
exit(1)

if __name__ == "__main__":
main()
Expand Down

0 comments on commit d70cf91

Please sign in to comment.