fix(init): hide opencode user-scope path from init output#249
Merged
Conversation
Deploying archgate-cli with
|
| Latest commit: |
bc560f7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4762a453.archgate-cli.pages.dev |
| Branch Preview URL: | https://claude-dazzling-tharp-a5432e.archgate-cli.pages.dev |
The opencode auto-install success path was returning the resolved absolute agents directory as `PluginResult.detail`, which the init summary then printed to stdout. This leaked the user's home directory path unnecessarily — the "(user-scope)" placeholder already conveys that the install target is outside the project tree. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
acb6b8f to
cf131e9
Compare
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
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.
Summary
archgate initwhen the plugin is auto-installed(user-scope)placeholder in the init summary already communicates that the install target is outside the project tree — the full resolved path (e.g.C:\Users\<user>\.config\opencode\agents) was unnecessary noise and leaked the user's home directory into stdoutWhat changed
src/helpers/init-project.ts— the opencode branch intryInstallPlugin()no longer setsdetail: opencodeAgentsDir()on the success return. ThePluginResultis returned with onlyinstalled: trueandautoInstalled: true, so the init command prints the confirmation message without the path.Error/fallback paths (cli-not-found, install failure) are unchanged — they still carry the relevant detail for
printManualInstructions().Test plan
archgate init --editor opencode --install-pluginwith opencode on PATH and verify the output shows "Archgate plugin installed for opencode." without an absolute path below itarchgate init --editor opencode --install-pluginwithout opencode on PATH and verify the manual-install fallback still prints correctlybun test tests/helpers/init-project.test.ts tests/commands/init.test.ts)