File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,21 +137,23 @@ export async function ensureExecutable(
137137 return null ;
138138 }
139139
140- if ( cargoPath ) {
141- const disableAutoupdate = config . get < boolean > ( "disableAutoupdate" , false ) ;
142-
143- const shouldInstallOrUpdate = ( ! serverPath ) || ! disableAutoupdate ;
140+ if ( ! cargoPath ) {
141+ return serverPath ;
142+ }
143+
144+ const disableAutoupdate = config . get < boolean > ( "disableAutoupdate" , false ) ;
145+
146+ if ( ! serverPath || ! disableAutoupdate ) {
147+ return serverPath ;
148+ }
144149
145- if ( shouldInstallOrUpdate ) {
146- try {
147- await installServer ( command ) ;
150+ try {
151+ await installServer ( command ) ;
148152
149- serverPath = findExecutable ( command ) ;
150- } catch ( err ) {
151- window . showErrorMessage ( err ) ;
152- return null ;
153- }
154- }
153+ serverPath = findExecutable ( command ) ;
154+ } catch ( err ) {
155+ window . showErrorMessage ( err ) ;
156+ return null ;
155157 }
156158
157159 return serverPath ;
You can’t perform that action at this time.
0 commit comments