Repository navigation
fix: always send an absolute project path to the daemon - #92
Merged
Merged
Conversation
resolveProjectPath returned path-like input unchanged after tilde expansion. Inputs such as --project ., --project ../foo or a relative CENTY_CWD reached the daemon as relative paths. The daemon is about to reject relative paths (centy-io/centy-daemon#231, INVALID_PATH). Return resolve(untildify(input)) so the CLI always sends an absolute path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CENTY_CWD test hard-coded /env/path, which resolves to D:\env\path on Windows CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
resolveProjectPathreturns path-like input unchanged after tilde expansion. So--project .,--project ../fooand a relativeCENTY_CWDreach the daemon as relative paths.The daemon is about to reject relative paths (centy-io/centy-daemon#231,
INVALID_PATH). Every command that takes--projectroutes through this function, so all of them would fail.Fix
Return
resolve(untildify(input))so the CLI always sends an absolute path.resolveis imported fromnode:path. Nothing else changes.Tests
Updated
src/utils/resolve-project-path.spec.ts:.resolves toprocess.cwd()../xresolves toresolve(process.cwd(), '../x')some/pathresolves against cwd~/xexpands to an absolute home path (compared withnormalize/join, so it is Windows-safe)CENTY_CWDresolves to an absolute pathRelated: centy-io/centy-daemon#231
🤖 Generated with Claude Code