File tree 2 files changed +16
-8
lines changed
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
49
49
chmod -R 755 /var/www
50
50
fi
51
51
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
-
60
52
decrementNestingLevel
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ function isServiceAvailable() {
39
39
fi
40
40
}
41
41
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
+
42
48
guest_magento_dir=$2
43
49
use_php7=$4
44
50
vagrant_dir=" /vagrant"
@@ -124,4 +130,14 @@ if [[ ${php_config_content} =~ ${pattern} ]]; then
124
130
service apache2 restart 2> >( logError) > >( log)
125
131
fi
126
132
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
+
127
143
decrementNestingLevel
You can’t perform that action at this time.
0 commit comments