File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,11 @@ export class Repository {
132132
133133 this . branch = await this . getCurrentBranch ( ) ;
134134
135- this . branches = await this . repository . getBranches ( ) ;
135+ try {
136+ this . branches = await this . repository . getBranches ( ) ;
137+ } catch ( error ) {
138+ console . error ( error ) ;
139+ }
136140
137141 this . _onDidChangeStatus . fire ( ) ;
138142
Original file line number Diff line number Diff line change @@ -155,18 +155,29 @@ export class Repository {
155155 . pop ( ) ;
156156 return currentBranch ;
157157 } catch ( error ) {
158+ console . error ( error ) ;
158159 return "" ;
159160 }
160161 }
161162
162163 async getBranches ( ) {
163164 const info = await this . svn . info ( this . root ) ;
165+
166+ if ( info . exitCode === 0 ) {
167+ throw new Error ( info . stderr ) ;
168+ }
169+
164170 const repoUrl = info . stdout
165171 . match ( / < u r l > ( .* ?) < \/ u r l > / ) [ 1 ]
166172 . replace ( / \/ [ ^ \/ ] + $ / , "" ) ;
167173 const branchUrl = repoUrl + "/branches" ;
174+
168175 const result = await this . svn . list ( branchUrl ) ;
169176
177+ if ( result . exitCode === 0 ) {
178+ throw new Error ( result . stderr ) ;
179+ }
180+
170181 const branches = result . stdout
171182 . trim ( )
172183 . replace ( / \/ | \\ / g, "" )
You can’t perform that action at this time.
0 commit comments