Skip to content

Commit

Permalink
make sure an output file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Oct 18, 2024
1 parent 9c6e2cd commit c7cfb95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgscatalog.core/src/pgscatalog/core/cli/combine_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def run():
logger.setLevel(logging.DEBUG)
logger.debug("Verbose logging enabled")

out_path = pathlib.Path(args.outfile)
out_path = pathlib.Path(args.outfile).resolve()

if out_path.exists():
logger.critical(f"Output file already exists: {args.outfile}")
Expand Down Expand Up @@ -165,7 +165,7 @@ def run():
)
variant_log.append(log)

if n_finished == 0:
if n_finished == 0 or not out_path.exists():
raise ValueError(
"Couldn't process any scoring files. Did they all have non-additive weights?"
)
Expand Down

0 comments on commit c7cfb95

Please sign in to comment.