Skip to content

Commit

Permalink
Changed prompts in configure from 0/1 to no/yes
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-akadoo committed Sep 24, 2024
1 parent 72663dc commit 3c39e2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.5.1] - Unreleased

### Fixed
- Changed prompts in configure from 0/1 to no/yes (#461)

## [2.5.0] - 2024-09-24

### Added
Expand Down
7 changes: 6 additions & 1 deletion cls/SourceControl/Git/Settings.cls
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ ClassMethod Configure() As %Boolean [ CodeMode = objectgenerator ]
set prompt = $$$comMemberKeyGet(%class.Name,$$$cCLASSproperty,property,$$$cPROPdescription)
set promptQuoted = $$$QUOTE(prompt_":")
set promptQuoted = $replace(promptQuoted,"${username}","'""_$Username_""'")
do %code.WriteLine(" set response = ##class(%Library.Prompt).GetString("_promptQuoted_",.value,,,,"_defaultPromptFlag_")")
set propertyDef = ##class(%Dictionary.PropertyDefinition).%OpenId("SourceControl.Git.Settings||"_property_"")
if (propertyDef) && ((propertyDef.Type = "%Boolean") || (propertyDef.Name = "basicMode")) {
do %code.WriteLine(" set response = ##class(%Library.Prompt).GetYesNo("_promptQuoted_",.value,,"_defaultPromptFlag_")")
} else {
do %code.WriteLine(" set response = ##class(%Library.Prompt).GetString("_promptQuoted_",.value,,,,"_defaultPromptFlag_")")
}
do %code.WriteLine(" if response '= $$$SuccessResponse { quit 0 }")
do %code.WriteLine(" set inst."_property_" = value")

Expand Down

0 comments on commit 3c39e2b

Please sign in to comment.