Skip to content

Commit

Permalink
Yet another --filename fix (#2318)
Browse files Browse the repository at this point in the history
* Yet another `--filename` fix

* Fix
  • Loading branch information
vladsavelyev committed Feb 12, 2024
1 parent cf695a5 commit 2ab92b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions multiqc/multiqc.py
Expand Up @@ -580,13 +580,13 @@ def run(
logger.info("Printing report to stdout")
else:
if filename is not None and filename.endswith(".html"):
filename = config.output_fn_name[:-5]
filename = filename[:-5]
if filename is None and config.title is not None:
filename = re.sub(r"[^\w.-]", "", re.sub(r"[-\s]+", "-", config.title)).strip()
filename += "_multiqc"
filename += "_multiqc_report"
if filename is not None:
if "output_fn_name" not in config.nondefault_config:
config.output_fn_name = f"{filename}_report.html"
config.output_fn_name = f"{filename}.html"
if "data_dir_name" not in config.nondefault_config:
config.data_dir_name = f"{filename}_data"
if "plots_dir_name" not in config.nondefault_config:
Expand Down

0 comments on commit 2ab92b4

Please sign in to comment.