diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index 7886037d2ba..6e9a6f331ba 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -101,7 +101,6 @@ function buildWin32Setup(arch, target) { AppMutex: product.win32MutexName, TunnelMutex: product.win32TunnelMutex, TunnelServiceMutex: product.win32TunnelServiceMutex, - TunnelApplicationName: product.tunnelApplicationName, ApplicationName: product.applicationName, Arch: arch, AppId: { 'ia32': ia32AppId, 'x64': x64AppId, 'arm64': arm64AppId }[arch], diff --git a/build/win32/code.iss b/build/win32/code.iss index f584830e618..7754562225b 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -1362,7 +1362,7 @@ begin end; end; - if IsNotBackgroundUpdate() and not StopTunnelProcesses() then + if IsNotBackgroundUpdate() and CheckForMutexes('{#TunnelMutex}') then begin MsgBox('{#NameShort} is still running a tunnel. Please stop the tunnel before installing.', mbInformation, MB_OK); Result := false @@ -1380,30 +1380,6 @@ end; var ShouldRestartTunnelService: Boolean; -function StopTunnelProcesses(); -var - WaitCounter: Integer; - TaskKilled: Integer; -begin - Log('Stopping all tunnel services with taskkill'); - Exec('taskkill.exe', '/f /im "' + ExpandConstant('"{app}\bin\{#TunnelApplicationName}.exe"') + '"', '', SW_HIDE, ewWaitUntilTerminated, TaskKilled); - - WaitCounter := 10; - while (WaitCounter > 0) and CheckForMutexes('{#TunnelMutex}') do - begin - Log('Tunnel process is is still running, waiting'); - Sleep(500); - WaitCounter := WaitCounter - 1 - end; - - if CheckForMutexes('{#TunnelMutex}') then - Log('Unable to stop tunnel processes') - exit(False) - else - exit(True) - end -end; - procedure StopTunnelServiceIfNeeded(); var StopServiceResultCode: Integer; @@ -1631,4 +1607,4 @@ begin #endif Exec(ExpandConstant('{sys}\icacls.exe'), ExpandConstant('"{app}" /inheritancelevel:r ') + Permissions, '', SW_HIDE, ewWaitUntilTerminated, ResultCode); -end; +end; \ No newline at end of file diff --git a/src/vs/platform/remoteTunnel/node/remoteTunnelService.ts b/src/vs/platform/remoteTunnel/node/remoteTunnelService.ts index 84ccef33653..e3cee9778a2 100644 --- a/src/vs/platform/remoteTunnel/node/remoteTunnelService.ts +++ b/src/vs/platform/remoteTunnel/node/remoteTunnelService.ts @@ -340,13 +340,13 @@ export class RemoteTunnelService extends Disposable implements IRemoteTunnelServ } }); if (!this.environmentService.isBuilt) { - onOutput('Building tunnel CLI from sources and run\n', false); - onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}\n`, false); + onOutput('Building tunnel CLI from sources and run', false); + onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}`, false); tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...commandArgs], { cwd: join(this.environmentService.appRoot, 'cli'), stdio }); } else { - onOutput('Running tunnel CLI\n', false); + onOutput('Running tunnel CLI', false); const tunnelCommand = this.getTunnelCommandLocation(); - onOutput(`${logLabel} Spawning: ${tunnelCommand} tunnel ${commandArgs.join(' ')}\n`, false); + onOutput(`${logLabel} Spawning: ${tunnelCommand} tunnel ${commandArgs.join(' ')}`, false); tunnelProcess = spawn(tunnelCommand, ['tunnel', ...commandArgs], { cwd: homedir(), stdio }); }