File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ public function onPostUpdate(Event $event)
8585 $ nodeInstaller ->install ($ this ->config ->getNodeVersion ());
8686
8787 $ this ->io ->write ('' );
88+
89+ $ installedNodeVersion = $ nodeInstaller ->isInstalled ();
90+ if (strpos ($ installedNodeVersion , 'v ' . $ this ->config ->getNodeVersion ()) === false ) {
91+ throw new \RuntimeException ('Could not verify node.js installation ' );
92+ } else {
93+ $ this ->io ->write (sprintf (
94+ 'node.js v%s installed ' ,
95+ $ this ->config ->getNodeVersion ()
96+ ));
97+ }
8898 }
8999
90100 if ($ this ->config ->getYarnVersion () !== null ) {
@@ -105,6 +115,16 @@ public function onPostUpdate(Event $event)
105115 ));
106116
107117 $ yarnInstaller ->install ($ this ->config ->getYarnVersion ());
118+
119+ $ installedYarnVersion = $ yarnInstaller ->isInstalled ();
120+ if (strpos ($ installedYarnVersion , $ this ->config ->getYarnVersion ()) === false ) {
121+ throw new \RuntimeException ('Could not verify yarn version ' );
122+ } else {
123+ $ this ->io ->write (sprintf (
124+ 'node.js v%s installed ' ,
125+ $ this ->config ->getNodeVersion ()
126+ ));
127+ }
108128 }
109129 }
110130 }
You can’t perform that action at this time.
0 commit comments