Skip to content

Enhanced npm executable detection to improve reliability of package manager initialization#304

Merged
woocheol-lge merged 1 commit intomainfrom
ps_test
Apr 7, 2026
Merged

Enhanced npm executable detection to improve reliability of package manager initialization#304
woocheol-lge merged 1 commit intomainfrom
ps_test

Conversation

@woocheol-lge
Copy link
Copy Markdown
Contributor

@woocheol-lge woocheol-lge commented Apr 7, 2026

Description

Enhanced npm executable detection to improve reliability of package manager initialization

@woocheol-lge woocheol-lge requested a review from dd-jy April 7, 2026 05:40
@woocheol-lge woocheol-lge self-assigned this Apr 7, 2026
@woocheol-lge woocheol-lge added the bug fix [PR] Fix the bug label Apr 7, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

Updates to npm and yarn package manager modules: Npm resolves the npm executable path via shutil.which() instead of hard-coding it, and Yarn adds a warning log when the executable is unavailable before returning False.

Changes

Cohort / File(s) Summary
Package Manager Executables
src/fosslight_dependency/package_manager/Npm.py, src/fosslight_dependency/package_manager/Yarn.py
Npm.py now uses shutil.which("npm") to resolve the npm executable path in install_license_checker. Yarn.py adds warning logging in start_license_checker when Yarn is not available on the system.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

chore

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title emphasizes npm executable detection, but the actual changes involve using an explicit npm path in one file and adding a warning in Yarn. The title doesn't clearly reflect these specific, focused changes. Consider a more precise title like 'Use explicit npm path for global license-checker installation' to accurately reflect the main change in Npm.py and mention the Yarn logging addition if relevant.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ps_test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@woocheol-lge woocheol-lge changed the title use explicit npm path for global license-checker installation Enhanced npm executable detection to improve reliability of package manager initialization Apr 7, 2026
@woocheol-lge woocheol-lge merged commit a887059 into main Apr 7, 2026
13 checks passed
@woocheol-lge woocheol-lge deleted the ps_test branch April 7, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix [PR] Fix the bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants