@@ -28,7 +28,7 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
2828
2929 if ( ! isOnPath ( 'dotnet' ) ) {
3030 // TODO: In a future release, this should be an error. For this release, we will let it go
31- console . log ( "The .NET CLI tools are not installed. .NET Core debugging will not be enabled." )
31+ console . log ( "The .NET CLI tools are not installed. .NET Core debugging will not be enabled." ) ;
3232 return ;
3333 }
3434
@@ -38,7 +38,7 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
3838 // Create our log file and override _channel.append to also outpu to the log
3939 _installLog = fs . createWriteStream ( path . join ( _coreClrDebugDir , 'install.log' ) ) ;
4040 ( function ( ) {
41- var proxied = _channel . append ;
41+ let proxied = _channel . append ;
4242 _channel . append = function ( val : string ) {
4343 _installLog . write ( val ) ;
4444 proxied . apply ( this , arguments ) ;
@@ -48,8 +48,8 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
4848 _channel . appendLine ( "Downloading and configuring the .NET Core Debugger..." ) ;
4949 _channel . show ( vscode . ViewColumn . Three ) ;
5050
51- var installStage = 'dotnet restore' ;
52- var installError = '' ;
51+ let installStage = 'dotnet restore' ;
52+ let installError = '' ;
5353
5454 spawnChildProcess ( 'dotnet' , [ '--verbose' , 'restore' , '--configfile' , 'NuGet.config' ] , _channel , _coreClrDebugDir )
5555 . then ( function ( ) {
@@ -59,8 +59,8 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
5959 installStage = "ensureAd7" ;
6060 return ensureAd7EngineExists ( _channel , _debugAdapterDir ) ;
6161 } ) . then ( function ( ) {
62- installStage = "additionalTasks"
63- var promises : Promise < void > [ ] = [ ] ;
62+ installStage = "additionalTasks" ;
63+ let promises : Promise < void > [ ] = [ ] ;
6464
6565 promises . push ( renameDummyEntrypoint ( ) ) ;
6666 promises . push ( removeLibCoreClrTraceProvider ( ) ) ;
@@ -86,7 +86,7 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
8686
8787function initializeTelemetry ( context : vscode . ExtensionContext ) {
8888 // parse our own package.json into json
89- var packageJson = JSON . parse ( fs . readFileSync ( path . join ( context . extensionPath , 'package.json' ) ) . toString ( ) ) ;
89+ const packageJson = JSON . parse ( fs . readFileSync ( path . join ( context . extensionPath , 'package.json' ) ) . toString ( ) ) ;
9090
9191 let extensionId = packageJson [ "publisher" ] + "." + packageJson [ "name" ] ;
9292 let extensionVersion = packageJson [ "version" ] ;
@@ -116,13 +116,13 @@ function writeCompletionFile() : Promise<void> {
116116}
117117
118118function renameDummyEntrypoint ( ) : Promise < void > {
119- var src = path . join ( _debugAdapterDir , 'dummy' ) ;
120- var dest = path . join ( _debugAdapterDir , 'OpenDebugAD7' ) ;
119+ let src = path . join ( _debugAdapterDir , 'dummy' ) ;
120+ let dest = path . join ( _debugAdapterDir , 'OpenDebugAD7' ) ;
121121
122122 src += getPlatformExeExtension ( ) ;
123123 dest += getPlatformExeExtension ( ) ;
124124
125- var promise = new Promise < void > ( function ( resolve , reject ) {
125+ const promise = new Promise < void > ( function ( resolve , reject ) {
126126 fs . rename ( src , dest , function ( err ) {
127127 if ( err ) {
128128 reject ( err . code ) ;
@@ -137,7 +137,7 @@ function renameDummyEntrypoint() : Promise<void> {
137137
138138function removeLibCoreClrTraceProvider ( ) : Promise < void >
139139{
140- var filePath = path . join ( _debugAdapterDir , 'libcoreclrtraceptprovider' + getPlatformLibExtension ( ) ) ;
140+ const filePath = path . join ( _debugAdapterDir , 'libcoreclrtraceptprovider' + getPlatformLibExtension ( ) ) ;
141141
142142 if ( ! existsSync ( filePath ) ) {
143143 return Promise . resolve ( ) ;
@@ -204,11 +204,12 @@ function isOnPath(command : string) : boolean {
204204 }
205205
206206 let pathSegments : string [ ] = pathValue . split ( seperatorChar ) ;
207- for ( var segment of pathSegments ) {
207+ for ( let segment of pathSegments ) {
208208 if ( segment . length === 0 || ! path . isAbsolute ( segment ) ) {
209209 continue ;
210210 }
211- var segmentPath = path . join ( segment , fileName ) ;
211+
212+ const segmentPath = path . join ( segment , fileName ) ;
212213 if ( existsSync ( segmentPath ) ) {
213214 return true ;
214215 }
@@ -236,7 +237,7 @@ function ensureAd7EngineExists(channel: vscode.OutputChannel, outputDirectory: s
236237}
237238
238239function spawnChildProcess ( process : string , args : string [ ] , channel : vscode . OutputChannel , workingDirectory : string ) : Promise < void > {
239- var promise = new Promise < void > ( function ( resolve , reject ) {
240+ const promise = new Promise < void > ( function ( resolve , reject ) {
240241 const child = child_process . spawn ( process , args , { cwd : workingDirectory } ) ;
241242
242243 child . stdout . on ( 'data' , ( data ) => {
0 commit comments