Skip to content

Commit 78801e0

Browse files
committed
Fix setting empty remote when remote is already empty
1 parent 5423212 commit 78801e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3104,6 +3104,9 @@ ClassMethod SetConfiguredRemote(url) As %String
31043104
remoteExists&&(url'=""): ##class(SourceControl.Git.Utils).RunGitCommandWithInput("remote",,.errStream,.outStream,"set-url","origin",url),
31053105
'remoteExists&&(url'=""): ##class(SourceControl.Git.Utils).RunGitCommandWithInput("remote",,.errStream,.outStream,"add","origin",url),
31063106
1: -1)
3107+
if (returnCode = -1) {
3108+
return ""
3109+
}
31073110
if (returnCode '= 0) {
31083111
$$$ThrowStatus($$$ERROR($$$GeneralError,"git reported failure"))
31093112
}

0 commit comments

Comments
 (0)