File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
30
- Make sure more fetch calls prune the remote branches (#471 )
31
31
- Force export of item if it has been modified (#354 )
32
32
- Production configuration page no longer closes Sync/WebUI when operations there change the production (#542 )
33
+ - Fixed sending OS error when git pull encounters error (#545 )
33
34
34
35
## [ 2.6.0] - 2024-10-07
35
36
Original file line number Diff line number Diff line change @@ -44,9 +44,9 @@ ClassMethod Configure()
44
44
}
45
45
46
46
/// API for git pull - just wraps Utils
47
- ClassMethod Pull ()
47
+ ClassMethod Pull (terminateOnError As %Boolean = 0 )
48
48
{
49
- quit ##class (SourceControl.Git.Utils ).Pull ()
49
+ quit ##class (SourceControl.Git.Utils ).Pull (, terminateOnError )
50
50
}
51
51
52
52
/// Locks the environment to prevent changes to code other than through git pull.
Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ ClassMethod GetCurrentRevision() As %String
610
610
quit revision
611
611
}
612
612
613
- ClassMethod Pull (remote As %String = " origin" ) As %Status
613
+ ClassMethod Pull (remote As %String = " origin" , terminateOnError As %Boolean = 0 ) As %Status
614
614
{
615
615
New %gitSCOutputFlag
616
616
Set %gitSCOutputFlag = 1
@@ -625,6 +625,10 @@ ClassMethod Pull(remote As %String = "origin") As %Status
625
625
write !
626
626
do errStream .OutputToDevice ()
627
627
write !, " Pull ran with return code: " _ returnCode
628
+ set err = errStream .Read ()
629
+ if $find (err ," error" ) && terminateOnError {
630
+ quit $$$Error($$$GeneralError, err )
631
+ }
628
632
quit $$$OK
629
633
}
630
634
You can’t perform that action at this time.
0 commit comments