@@ -423,32 +423,33 @@ export abstract class OmnisharpServer {
423423 } ) . catch ( err => {
424424 return omnisharp . findServerPath ( installDirectory ) ;
425425 } ) . catch ( err => {
426- const platform = getCurrentPlatform ( ) ;
427- if ( platform == Platform . Unknown && process . platform === 'linux' ) {
428- this . _channel . appendLine ( "[ERROR] Could not locate an OmniSharp server that supports your Linux distribution." ) ;
429- this . _channel . appendLine ( "" ) ;
430- this . _channel . appendLine ( "OmniSharp provides a richer C# editing experience, with features like IntelliSense and Find All References." ) ;
431- this . _channel . appendLine ( "It is recommend that you download the version of OmniSharp that runs on Mono using the following steps:" ) ;
432- this . _channel . appendLine ( " 1. If it's not already installed, download and install Mono (https://www.mono-project.com)" ) ;
433- this . _channel . appendLine ( " 2. Download and untar the latest OmniSharp Mono release from https://github.com/OmniSharp/omnisharp-roslyn/releases/" ) ;
434- this . _channel . appendLine ( " 3. In Visual Studio Code, select Preferences->User Settings to open settings.json." ) ;
435- this . _channel . appendLine ( " 4. In settings.json, add a new setting: \"omnisharp.path\": \"/path/to/omnisharp/OmniSharp.exe\"" ) ;
436- this . _channel . appendLine ( " 5. In settings.json, add a new setting: \"omnisharp.useMono\": true" ) ;
437- this . _channel . appendLine ( " 6. Restart Visual Studio Code." ) ;
438- this . _channel . show ( ) ;
439-
440- throw err ;
441- }
426+ return getCurrentPlatform ( ) . then ( platform => {
427+ if ( platform = == Platform . Unknown && process . platform === 'linux' ) {
428+ this . _channel . appendLine ( "[ERROR] Could not locate an OmniSharp server that supports your Linux distribution." ) ;
429+ this . _channel . appendLine ( "" ) ;
430+ this . _channel . appendLine ( "OmniSharp provides a richer C# editing experience, with features like IntelliSense and Find All References." ) ;
431+ this . _channel . appendLine ( "It is recommend that you download the version of OmniSharp that runs on Mono using the following steps:" ) ;
432+ this . _channel . appendLine ( " 1. If it's not already installed, download and install Mono (https://www.mono-project.com)" ) ;
433+ this . _channel . appendLine ( " 2. Download and untar the latest OmniSharp Mono release from https://github.com/OmniSharp/omnisharp-roslyn/releases/" ) ;
434+ this . _channel . appendLine ( " 3. In Visual Studio Code, select Preferences->User Settings to open settings.json." ) ;
435+ this . _channel . appendLine ( " 4. In settings.json, add a new setting: \"omnisharp.path\": \"/path/to/omnisharp/OmniSharp.exe\"" ) ;
436+ this . _channel . appendLine ( " 5. In settings.json, add a new setting: \"omnisharp.useMono\": true" ) ;
437+ this . _channel . appendLine ( " 6. Restart Visual Studio Code." ) ;
438+ this . _channel . show ( ) ;
439+
440+ throw err ;
441+ }
442442
443- const config = vscode . workspace . getConfiguration ( ) ;
444- const proxy = config . get < string > ( 'http.proxy' ) ;
445- const strictSSL = config . get ( 'http.proxyStrictSSL' , true ) ;
446- const logger = ( message : string ) => { this . _logger . appendLine ( message ) ; } ;
443+ const config = vscode . workspace . getConfiguration ( ) ;
444+ const proxy = config . get < string > ( 'http.proxy' ) ;
445+ const strictSSL = config . get ( 'http.proxyStrictSSL' , true ) ;
446+ const logger = ( message : string ) => { this . _logger . appendLine ( message ) ; } ;
447447
448- this . _fireEvent ( Events . BeforeServerInstall , this ) ;
448+ this . _fireEvent ( Events . BeforeServerInstall , this ) ;
449449
450- return download . go ( flavor , platform , this . _logger , proxy , strictSSL ) . then ( _ => {
451- return omnisharp . findServerPath ( installDirectory ) ;
450+ return download . go ( flavor , platform , this . _logger , proxy , strictSSL ) . then ( _ => {
451+ return omnisharp . findServerPath ( installDirectory ) ;
452+ } ) ;
452453 } ) ;
453454 } ) ;
454455 }
0 commit comments