File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1212namespace Symfony \Flex \Event ;
1313
1414use Composer \Script \Event ;
15+ use Composer \Script \ScriptEvents ;
1516
1617class UpdateEvent extends Event
1718{
1819 private $ force ;
1920
2021 public function __construct (bool $ force )
2122 {
23+ $ this ->name = ScriptEvents::POST_UPDATE_CMD ;
2224 $ this ->force = $ force ;
2325 }
2426
Original file line number Diff line number Diff line change @@ -483,7 +483,9 @@ public function install(Event $event = null)
483483 $ this ->io ->writeError ('' );
484484
485485 if (!$ recipes ) {
486- $ this ->synchronizePackageJson ($ rootDir );
486+ if (ScriptEvents::POST_UPDATE_CMD === $ event ->getName ()) {
487+ $ this ->synchronizePackageJson ($ rootDir );
488+ }
487489 $ this ->lock ->write ();
488490
489491 if ($ this ->downloader ->isEnabled ()) {
You can’t perform that action at this time.
0 commit comments