fix(checkpointing): skip checkpoint when cwd is the home directory #1294
Closedmurataslan1(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/1294/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- @@ -91,3 +92,7 @@9192 Effect.gen(function* () {9293 const operation = "CheckpointStore.captureCheckpoint";939495+ // Skip checkpointing for the home directory — git add -A on ~/ scans96+ // thousands of unrelated files and will time out.97+ const resolvedCwd = yield* Effect.try(() => path.resolve(input.cwd));98+ const home = yield* Effect.try(() => homedir());@@ -91,3 +92,7 @@9192 Effect.gen(function* () {9293 const operation = "CheckpointStore.captureCheckpoint";939495+ // Skip checkpointing for the home directory — git add -A on ~/ scans96+ // thousands of unrelated files and will time out.97+ const resolvedCwd = yield* Effect.try(() => path.resolve(input.cwd));98+ const home = yield* Effect.try(() => homedir());@@ -91,3 +92,15 @@9192 Effect.gen(function* () {9293 const operation = "CheckpointStore.captureCheckpoint";939495+ // Skip checkpointing for the home directory — git add -A on ~/ scans96+ // thousands of unrelated files and will time out.97+ const resolvedCwd = yield* Effect.try(() => path.resolve(input.cwd));98+ const home = yield* Effect.try(() => homedir());99+ if (resolvedCwd === home) {100+ return yield* new CheckpointInvariantError({101+ operation,102+ detail:103+ "Skipping checkpoint: working directory is the home directory. " +104+ "Please open a specific project folder instead.",105+ });106+ }
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
9c7be90e-ba44-41be-9a5e-19f889aeb4b1You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
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