Skip to content

Commit 2262e41

Browse files
committed
Fix environment
1 parent c71bab2 commit 2262e41

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Pull event handler that does an IPM uninstall and load to handle deletes (#631)
1212
- Partial support for production decomposition with the new interoperability editors
1313

14+
### Fixed
15+
- Changing system mode (environment name) in setting spersists after instance restart (#655)
16+
1417
## [2.10.0] - 2025-02-10
1518

1619
### Added

cls/SourceControl/Git/Settings.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Method %Save() As %Status
159159
set @storage@("settings", "user", $username, "basicMode") = ..basicMode
160160
}
161161
try {
162-
do $SYSTEM.Version.SystemMode(..environmentName)
162+
do ##class(%zpkg.isc.sc.git.SystemMode).SetSystemMode(..environmentName)
163163
} catch e {
164164
// no-op; user might not have privileges.
165165
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Class %zpkg.isc.sc.git.SystemMode
2+
{
3+
ClassMethod SetEnvironment(environment As %String) As %Status [ NotInheritable, Private ]
4+
{
5+
$$$AddAllRoleTemporary
6+
do $SYSTEM.Version.SystemMode(environment)
7+
set nm = $NAMESPACE
8+
zn "%SYS"
9+
set obj = ##class(Config.Startup).Open()
10+
set obj.SystemMode = environment
11+
do obj.%Save()
12+
zn nm
13+
14+
return $$$OK
15+
}
16+
17+
ClassMethod SetSystemMode(environment As %String) As %Status [ NotInheritable ]
18+
{
19+
try {
20+
do ..SetEnvironment(environment)
21+
} catch e {
22+
return e.AsStatus()
23+
}
24+
return $$$OK
25+
}
26+
}

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Document name="git-source-control.ZPM">
44
<Module>
55
<Name>git-source-control</Name>
6-
<Version>2.10.0</Version>
6+
<Version>2.11.0</Version>
77
<Description>Server-side source control extension for use of Git on InterSystems platforms</Description>
88
<Keywords>git source control studio vscode</Keywords>
99
<Packaging>module</Packaging>

0 commit comments

Comments
 (0)