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 {
132
132
133
133
this . branch = await this . getCurrentBranch ( ) ;
134
134
135
- this . branches = await this . repository . getBranches ( ) ;
135
+ try {
136
+ this . branches = await this . repository . getBranches ( ) ;
137
+ } catch ( error ) {
138
+ console . error ( error ) ;
139
+ }
136
140
137
141
this . _onDidChangeStatus . fire ( ) ;
138
142
Original file line number Diff line number Diff line change @@ -155,18 +155,29 @@ export class Repository {
155
155
. pop ( ) ;
156
156
return currentBranch ;
157
157
} catch ( error ) {
158
+ console . error ( error ) ;
158
159
return "" ;
159
160
}
160
161
}
161
162
162
163
async getBranches ( ) {
163
164
const info = await this . svn . info ( this . root ) ;
165
+
166
+ if ( info . exitCode === 0 ) {
167
+ throw new Error ( info . stderr ) ;
168
+ }
169
+
164
170
const repoUrl = info . stdout
165
171
. match ( / < u r l > ( .* ?) < \/ u r l > / ) [ 1 ]
166
172
. replace ( / \/ [ ^ \/ ] + $ / , "" ) ;
167
173
const branchUrl = repoUrl + "/branches" ;
174
+
168
175
const result = await this . svn . list ( branchUrl ) ;
169
176
177
+ if ( result . exitCode === 0 ) {
178
+ throw new Error ( result . stderr ) ;
179
+ }
180
+
170
181
const branches = result . stdout
171
182
. trim ( )
172
183
. replace ( / \/ | \\ / g, "" )
You can’t perform that action at this time.
0 commit comments