Skip to content

Commit

Permalink
Merge pull request #684 from intersystems/v0.9.x-fix-banner
Browse files Browse the repository at this point in the history
fix: improve banner display in interactive zpm shell
  • Loading branch information
isc-shuliu authored Jan 8, 2025
2 parents 7cb4105 + 544ad61 commit ea5e31b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #682 When downloading IPM via the `enable` command from a remote registry, allow user to pass in the registry name (or get the only existent one), instead of the deployment enabled registry.

### Fixed
- #684 Fixed banner display issues in interactive `zpm` shell.
- #682 When enabling IPM in a namespace using local IPM caches, check for existence of `<iris-root>/lib/ipm/` beforing querying it.
- #682 Use more standard wording of mapping when enabling IPM
- #681 Convert specified namespaces to upper case for `enable` and `unmap` commands.
Expand Down
16 changes: 11 additions & 5 deletions src/cls/IPM/Main.cls
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,15 @@ ClassMethod ShellInternal(pCommand As %String, Output pException As %Exception.A
Set tOneCommand = 1
}
do ##class(%IPM.Main).GetVersion("zpm",.out)
If $Get(out) = "" {
Set registryInfo = $$$FormattedLine($$$Cyan, "No registry configured")
} Else {
Set registryInfo = "Current registry "_$$$FormattedLine($$$Cyan, out)
}
Set introMessageList = $ListBuild(
"Welcome to the Package Manager Shell (ZPM). Version: "_$$$FormattedLine($$$Green, ..GetVersionModule("zpm")),
"Enter q/quit to exit the shell. Enter ?/help to view available commands",
"Current registry "_$$$FormattedLine($$$Cyan,$g(out))
registryInfo
)
Set tInShell = 0
For {
Expand Down Expand Up @@ -1204,11 +1209,12 @@ ClassMethod GetVersionModule(name, namespace = {$namespace})
{
New $Namespace
Set $Namespace=namespace
Do ..GetListModules(name,.list)
If $Data(list(name)) {
quit $ListGet(list(name),1)
Try {
Do ..GetListModules(,name,.list)
Return $ListGet(list(1), 2)
} Catch ex {
Return ""
}
quit ""
}

/// @API.Method
Expand Down

0 comments on commit ea5e31b

Please sign in to comment.