Skip to content

Fix: Prevent plugins from being installed to wrong type directory (fixes #235)#249

Open
swashbuck wants to merge 1 commit intomasterfrom
issue/235
Open

Fix: Prevent plugins from being installed to wrong type directory (fixes #235)#249
swashbuck wants to merge 1 commit intomasterfrom
issue/235

Conversation

@swashbuck
Copy link
Copy Markdown
Contributor

Fixes #235

Fix

  • Check installed plugins before determining install targets — fetchProjectInfo() is now called during loadPluginData() so the CLI knows what's already on disk
  • Skip plugins that are already installed at the matched version, preventing duplicate installations
  • Infer plugin type from the existing install path (e.g. src/menu/adapt-contrib-boxMenu → type menu) before falling back to keyword/attribute detection — this prevents already-installed plugins from being misrouted to the default src/components/ directory

Testing

  1. Start with a project where adapt-contrib-boxMenu is installed in src/menu/ and listed in adapt.json with "*"
  2. Run adapt install adapt-contrib-media
  3. Verify adapt-contrib-boxMenu is NOT duplicated into src/components/
  4. Run adapt install (no args) and verify all plugins go to their correct type directories
  5. On a clean project, run adapt install adapt-contrib-boxMenu and verify it installs to src/menu/
  6. Verify a mix of component/extension/menu/theme plugins all route correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

adapt install places menu plugin in src/components/ when already installed in src/menu/

2 participants