diff --git a/README.md b/README.md index 742b004..ba12198 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,10 @@ without the file — defaults are sensible — but committing an explicit `skill makes your skill setup reproducible across the team. Auto-sync after every `composer install` / `update` is **on by default**, so after `init` you -get fresh skills with no further setup. To opt out, set `"auto-sync": false` in `skills.json`; -`composer install --no-scripts` also suppresses the auto-run for a single invocation without -changing the config. +get fresh skills with no further setup. To opt out, set `"auto-sync": false` in `skills.json`. +Note that `--no-scripts` does **not** skip it: that flag only disables the `scripts` section of +`composer.json`, while auto-sync is a plugin event listener. To skip it for a single invocation, +use `--no-plugins`, which disables every Composer plugin for that run. ### Global composer installation diff --git a/src/Composer/SkillsPlugin.php b/src/Composer/SkillsPlugin.php index 51b1dcf..1b5ef4e 100644 --- a/src/Composer/SkillsPlugin.php +++ b/src/Composer/SkillsPlugin.php @@ -29,13 +29,11 @@ * Wires our {@see CommandProvider} into Composer so that * `composer skills:update` becomes available. * - * By default the plugin follows a **pull model**: nothing touches the user's - * filesystem until they explicitly invoke `skills:update`. Projects that want - * a hands-off setup can opt in by setting `extra.skills.auto-sync: true` — - * the plugin then subscribes to {@see ScriptEvents::POST_INSTALL_CMD} and - * {@see ScriptEvents::POST_UPDATE_CMD} and runs sync automatically. The - * `composer --no-scripts` flag still suppresses the auto-run, because - * Composer skips dispatching script events entirely in that mode. + * Auto-sync listens to {@see ScriptEvents::POST_INSTALL_CMD} and + * {@see ScriptEvents::POST_UPDATE_CMD} and runs `skills:update` unless the + * project sets `auto-sync: false`. `composer --no-scripts` does not suppress + * it: in that mode Composer drops only the root package's `scripts` + * listeners and still dispatches the events to plugin subscribers. * * `activate()` captures the {@see Composer} and {@see IOInterface} handed in * by the host so the event callbacks can reuse them; `deactivate()` and diff --git a/src/Init/InteractiveInitWizard.php b/src/Init/InteractiveInitWizard.php index 242298b..31efa35 100644 --- a/src/Init/InteractiveInitWizard.php +++ b/src/Init/InteractiveInitWizard.php @@ -629,7 +629,7 @@ private function askAutoSync(IOInterface $io, array $defaults): bool $io->write('4/4 auto-sync — when true (default), skills:update runs'); $io->write(' automatically after every composer install /'); - $io->write(' composer update. Suppressed by --no-scripts.'); + $io->write(' composer update.'); $bool = $io->askConfirmation( \sprintf( ' auto-sync [%s]: ',