@@ -157,22 +157,25 @@ move it to the new location of '${basedir}/test/integration'. Please move the di
157157
158158 // proceed plugin-specific upgrade logic contained in 'scripts/_Upgrade.groovy' under plugin's root
159159 def plugins = new File (" ${ basedir} /plugins/" )
160- plugins. eachFile { f ->
161- if (f. isDirectory() && f. name != ' core' ) {
162- // fix for Windows-style path with backslashes
163-
164- def pluginBase = " ${ basedir} /plugins/${ f.name} " . toString(). replaceAll(" \\\\ " ," /" )
165- // proceed _Upgrade.groovy plugin script if exists
166- def upgradeScript = new File ( " ${ pluginBase} /scripts/_Upgrade.groovy" )
167- if ( upgradeScript. exists() ) {
168- event(" StatusUpdate" , [ " Executing ${ f.name} plugin upgrade script" ])
169- // instrumenting plugin scripts adding 'pluginBasedir' variable
170- def instrumentedUpgradeScript = " def pluginBasedir = '${ pluginBase} '\n " + upgradeScript. text
171- // we are using text form of script here to prevent Gant caching
172- includeTargets << instrumentedUpgradeScript
173- }
174- }
175- }
160+ if (plugins. exists()) {
161+ plugins. eachFile { f ->
162+ if (f. isDirectory() && f. name != ' core' ) {
163+ // fix for Windows-style path with backslashes
164+
165+ def pluginBase = " ${ basedir} /plugins/${ f.name} " . toString(). replaceAll(" \\\\ " ," /" )
166+ // proceed _Upgrade.groovy plugin script if exists
167+ def upgradeScript = new File ( " ${ pluginBase} /scripts/_Upgrade.groovy" )
168+ if ( upgradeScript. exists() ) {
169+ event(" StatusUpdate" , [ " Executing ${ f.name} plugin upgrade script" ])
170+ // instrumenting plugin scripts adding 'pluginBasedir' variable
171+ def instrumentedUpgradeScript = " def pluginBasedir = '${ pluginBase} '\n " + upgradeScript. text
172+ // we are using text form of script here to prevent Gant caching
173+ includeTargets << instrumentedUpgradeScript
174+ }
175+ }
176+ }
177+
178+ }
176179
177180 event(" StatusUpdate" , [ " Please make sure you view the README for important information about changes to your source code." ])
178181
0 commit comments