Skip to content

Commit

Permalink
Merge pull request #485 from intersystems/v1-enable-globally
Browse files Browse the repository at this point in the history
Support enabling IPM instance-wide
  • Loading branch information
isc-tleavitt authored Oct 10, 2024
2 parents 6a9dd01 + 327eb17 commit 72fb28e
Show file tree
Hide file tree
Showing 5 changed files with 355 additions and 27 deletions.
1 change: 1 addition & 0 deletions module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<UnitTest Name="/tests/integration_tests/" Package="Test.PM.Integration" Phase="verify"/>
<Resource Name="/doc/README.txt"/>
<Invoke Class="IPM.Installer" Method="Map" Phase="Reload" When="Before" />
<Invoke Class="IPM.Installer" Method="MapIfLegacy" Phase="Compile" When="After" />
<Invoke Class="%IPM.Main" Method="UpdateLanguageExtensions" />
<Invoke Class="%IPM.Utils.Migration" Method="RunAll">
<Arg>${verbose}</Arg>
Expand Down
8 changes: 8 additions & 0 deletions preload/cls/IPM/Installer.cls
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ ClassMethod ZPMCompile()
Quit ##class(%IPM.Main).Shell("ZPM compile")
}

ClassMethod MapIfLegacy()
{
If ##class(%IPM.Utils.Migration).HasLegacyZPMPackage() {
Quit ##class(%IPM.Main).Shell("enable -globally -map")
}
Quit $$$OK
}

ClassMethod EndCompile(qstruct) As %Status
{
#; Behave as simple installer
Expand Down
Loading

0 comments on commit 72fb28e

Please sign in to comment.