Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/macaron/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022 - 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022 - 2025, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.

"""This is the main entrypoint to run Macaron."""
Expand Down Expand Up @@ -537,9 +537,9 @@ def main(argv: list[str] | None = None) -> None:
sys.exit(os.EX_USAGE)

if os.path.isdir(args.output_dir):
logger.info("Setting the output directory to %s", args.output_dir)
logger.info("Setting the output directory to %s", os.path.relpath(args.output_dir, os.getcwd()))
else:
logger.info("No directory at %s. Creating one ...", args.output_dir)
logger.info("No directory at %s. Creating one ...", os.path.relpath(args.output_dir, os.getcwd()))
os.makedirs(args.output_dir)

# Add file handler to the root logger. Remove stream handler from the
Expand Down
4 changes: 2 additions & 2 deletions src/macaron/repo_finder/repo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def generate_report(purl: str, commit: str, repo: str, target_dir: str) -> bool:
fullpath = f"{target_dir}/{filename}"

os.makedirs(os.path.dirname(fullpath), exist_ok=True)
logger.info("Writing report to: %s", fullpath)
logger.info("Writing report to: %s", os.path.relpath(fullpath, os.getcwd()))

try:
with open(fullpath, "w", encoding="utf-8") as file:
Expand All @@ -84,7 +84,7 @@ def generate_report(purl: str, commit: str, repo: str, target_dir: str) -> bool:
logger.debug("Failed to write report to file: %s", error)
return False

logger.info("Report written to: %s", fullpath)
logger.info("Report written to: %s", os.path.relpath(fullpath, os.getcwd()))

return True

Expand Down