Skip to content

Support directory paths for flake-lock-path#127

Open
Malix-Labs wants to merge 1 commit into
DeterminateSystems:mainfrom
Malix-Labs:support-directory-paths
Open

Support directory paths for flake-lock-path#127
Malix-Labs wants to merge 1 commit into
DeterminateSystems:mainfrom
Malix-Labs:support-directory-paths

Conversation

@Malix-Labs

@Malix-Labs Malix-Labs commented Jun 19, 2026

Copy link
Copy Markdown

If the provided flake-lock-path is a directory, automatically append flake.lock.

Summary by CodeRabbit

  • New Features
    • The flake-lock-path parameter now accepts directory paths in addition to file paths. When a directory is specified, the action automatically appends flake.lock to locate the configuration file. Missing paths are handled gracefully.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

src/index.ts gains fs and path imports and adds constructor logic in FlakeCheckerAction to detect when flake-lock-path is a directory via statSync, automatically appending flake.lock to the path. Filesystem errors are silently swallowed.

Changes

flake-lock-path directory resolution

Layer / File(s) Summary
fs/path imports and directory-to-file resolution
src/index.ts
Imports fs and path, then adds statSync logic in the FlakeCheckerAction constructor to rewrite a directory-valued flakeLockPath to <dir>/flake.lock, ignoring stat errors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐇 A path to a folder? No worries, dear friend,
I'll peek with statSync and follow the trend.
If it's a directory, I know what to do —
append flake.lock and carry right through!
Errors? I'll swallow them, hop along fast.
My lock file is found at last! 🔒

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for directory paths in the flake-lock-path parameter, which matches the core functionality added in src/index.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Warning

⚠️ This pull request shows signs of AI-generated slop (defensive_cruft). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/index.ts`:
- Around line 31-37: In the try-catch block where fs.statSync is called on
this.flakeLockPath, replace the empty catch block with error handling that
checks the error code. Only ignore errors with code ENOENT (file not found),
which represents the expected case of a missing path. For any other error codes
(such as EACCES for permission denied or EIO for IO errors), rethrow the error
so that real filesystem issues are properly surfaced to the caller instead of
being silently swallowed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ae204ca6-bb42-4409-8d87-986173babaf1

📥 Commits

Reviewing files that changed from the base of the PR and between a0f068d and 8735bb0.

⛔ Files ignored due to path filters (2)
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (1)
  • src/index.ts

Comment thread src/index.ts
@Malix-Labs

Malix-Labs commented Jun 19, 2026

Copy link
Copy Markdown
Author

This pull request shows signs of AI-generated slop (defensive_cruft). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

lol what

it's a dumb simple +7, excluding the imports and compiled dist

and i'm also not even sure coderabbit is right to suggest this #127 (comment)

edit: #127 (comment) yeah

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.

1 participant