Skip to content

Commit c2534e5

Browse files
committed
fix for GRAILS-6406 "Declarative plugins not being upgraded property (old version not deleted)"
1 parent 164247c commit c2534e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/_PluginDependencies.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ doInstallPluginFromURL = { URL url ->
454454
doInstallPluginZip = { File file ->
455455
withPluginInstall {
456456
def installEngine = createPluginInstallEngine()
457-
installEngine.installPlugin file, globalInstall
457+
installEngine.installPlugin file, globalInstall, true
458458
}
459459
}
460460

src/java/org/codehaus/groovy/grails/resolve/PluginInstallEngine.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ class PluginInstallEngine {
164164
* @param zipFile The plugin zip file
165165
* @param globalInstall Whether it is a global install or not (optional)
166166
*/
167-
void installPlugin(File zipFile, boolean globalInstall = false) {
167+
void installPlugin(File zipFile, boolean globalInstall = false, boolean overwrite = false) {
168168

169169
if(zipFile.exists()) {
170170
def (name, version) = readMetadataFromZip(zipFile.absolutePath)
171-
installPluginZipInternal name, version, zipFile, globalInstall, true
171+
installPluginZipInternal name, version, zipFile, globalInstall, overwrite
172172
}
173173
else {
174174
errorHandler "Plugin zip not found at location: ${zipFile.absolutePath}"
@@ -193,7 +193,7 @@ class PluginInstallEngine {
193193
catch (e) {
194194
errorHandler "Error downloading plugin ${zipURL}: ${e.message}"
195195
}
196-
installPlugin(file, globalInstall)
196+
installPlugin(file, globalInstall, true)
197197
}
198198

199199
protected void installPluginZipInternal(String name, String version, File pluginZip, boolean globalInstall = false, boolean overwrite = false) {

0 commit comments

Comments
 (0)