ipm
ipm copied to clipboard
Clean up "load from .tgz" process
In %IPM.Main:Load:
} ElseIf ##class(%File).Exists(tDirectoryName),$$$lcase($Piece(tDirectoryName, ".", *)) = "tgz" {
Set tTargetDirectory = $$$FileTempDirSys
Set tSC = ##class(%IPM.General.Archive).Extract(tDirectoryName, tTargetDirectory)
$$$ThrowOnError(##class(%IPM.Utils.Module).LoadNewModule(tTargetDirectory, .tParams))
}
This should:
- Support .tar.gz as well
- Specifically cover the case of a download of a GitHub release - so there's a nested directory too to account for
- Check the status from Extract ($$$ThrowOnError)