Skip to content

Conversation

@H3nSte1n
Copy link
Owner

@H3nSte1n H3nSte1n commented Dec 6, 2025

🐛 Fixes

Closes #30

📝 Description

This PR fixes the issue where relative paths in the .badge-config file (like ../../README.md) were not being resolved correctly, causing "ENOENT: no such file or directory" errors in monorepo setups.

🔧 Changes Made

1. Path Resolution in Globals.ts

  • Added path.resolve() to convert relative paths to absolute paths when configuration is loaded
  • Ensures paths are resolved from the current working directory (process.cwd())
  • Applies to both readmeFilePath and coverage_file_path configuration options

2. Fixed ReadmeWorker.ts Path Timing Issue

  • Removed static filePath property that was capturing the path at class load time
  • Changed to read Globals.BASE_README_PATH dynamically at runtime
  • This ensures custom paths from configuration are properly used

📦 Breaking Changes

None - this is a bug fix that maintains backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config File can take a readmeFilePath but still attempts to write on default README.md

2 participants