File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,4 @@ if [[ ${use_nfs_for_synced_folders} -eq 0 ]]; then
4949 chmod -R 755 /var/www
5050fi
5151
52- status " Installing js build tools"
53- {
54- apt-get install -y nodejs npm
55- ln -s /usr/bin/nodejs /usr/bin/node
56- npm install -g grunt-cli
57- npm install gulp -g
58- } 2> >( logError) > >( log)
59-
6052decrementNestingLevel
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ function isServiceAvailable() {
3939 fi
4040}
4141
42+ function isNodeJsInstalled() {
43+ nodejs_status=" $( dpkg -s nodejs | grep Status 2> >( log) ) "
44+ npm_status=" $( dpkg -s npm | grep Status 2> >( log) ) "
45+ [[ ${npm_status} == " Status: install ok installed" && ${nodejs_status} == " Status: install ok installed" ]]
46+ }
47+
4248guest_magento_dir=$2
4349use_php7=$4
4450vagrant_dir=" /vagrant"
@@ -124,4 +130,14 @@ if [[ ${php_config_content} =~ ${pattern} ]]; then
124130 service apache2 restart 2> >( logError) > >( log)
125131fi
126132
133+ if ! isNodeJsInstalled; then
134+ status " Installing js build tools"
135+ {
136+ apt-get install -y nodejs npm
137+ ln -s /usr/bin/nodejs /usr/bin/node
138+ npm install -g grunt-cli
139+ npm install gulp -g
140+ } 2> >( logError) > >( log)
141+ fi
142+
127143decrementNestingLevel
You can’t perform that action at this time.
0 commit comments