Make config path root-relative in start command - #1296
Conversation
The start/dev command handoff exported ENVIO_CONFIG as the directory-joined config path while also chdir-ing the runtime into the project root. Since clap joins ENVIO_CONFIG onto --directory on every invocation, the prefix was applied twice on restarts (e.g. envio/analytics/envio/analytics/config.yaml). Export the root-relative path instead, matching the convention that --config is resolved relative to --directory. https://claude.ai/code/session_014kgG3btfXFG5ujc6xzJja8
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds ParsedProjectPaths::config_relative_to_root(), updates executor to use that root-relative path for ENVIO_CONFIG, updates CLI help to state --config/ENVIO_CONFIG are resolved relative to --directory, and expands an error message when resolving the config path fails. ChangesENVIO_CONFIG Path Relativity
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
When the config file can't be read, the error now shows how the path was built (--config joined onto --directory) instead of only the final joined path, and the --config help text documents that it's resolved relative to --directory. https://claude.ai/code/session_014kgG3btfXFG5ujc6xzJja8
Summary
Fixes a bug where the config path passed to the start command was absolute, causing double-prefixing when consumers resolved it against the working directory. The config path is now computed relative to the project root.
Changes
config_relative_to_root()method toParsedProjectPathsthat computes the config path relative to the project root using path normalization and diffingbuild_start_command()to use the new relative path method instead of the absolute config pathENVIO_CONFIGis root-relative and should be resolved againstcwd/--directoryhttps://claude.ai/code/session_014kgG3btfXFG5ujc6xzJja8
Summary by CodeRabbit
Bug Fixes
Documentation
Tests