Skip to content

Commit 0bd6606

Browse files
committed
Don't start local app if not needed
1 parent 1b62c01 commit 0bd6606

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/remoteConnector.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,17 @@ export default class RemoteConnector extends Disposable {
742742
}
743743

744744
public async autoTunnelCommand(gitpodHost: string, instanceId: string, enabled: boolean) {
745+
const forceUseLocalApp = vscode.workspace.getConfiguration('gitpod').get<boolean>('remote.useLocalApp')!;
746+
if (!forceUseLocalApp) {
747+
const authority = vscode.Uri.parse(gitpodHost).authority;
748+
const configKey = `config/${authority}`;
749+
const localAppconfig = this.context.globalState.get<LocalAppConfig>(configKey);
750+
if (!localAppconfig || checkRunning(localAppconfig.pid) !== true) {
751+
// Do nothing if we are using SSH gateway
752+
return;
753+
}
754+
}
755+
745756
try {
746757
await this.withLocalApp(gitpodHost, client => {
747758
const request = new AutoTunnelRequest();

0 commit comments

Comments
 (0)