Skip to content

Commit

Permalink
Fix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 committed Sep 8, 2023
1 parent 3a19e48 commit f613d83
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@
"default": false,
"scope": "application"
},
"gitpod.lsshPort": {
"type": "number",
"description": "The port to use for the local SSH server.",
"scope": "application"
},
"gitpod.lsshIpcPort": {
"gitpod.lsshExtensionIpcPort": {
"type": "number",
"description": "The port to use for the local SSH ipc server.",
"scope": "application"
Expand Down
2 changes: 1 addition & 1 deletion src/common/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function commonSendEventData(logService: ILogService, segmentClient
logService.error('Failed to log event to app analytics:', err);
}
resolve();
}))
}));
}

interface SendErrorDataOptions {
Expand Down
6 changes: 3 additions & 3 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import * as vscode from 'vscode';
// are not available yet and will return `undefined` so we hardcode the defaults here

function getGitpodHost() {
return vscode.workspace.getConfiguration('gitpod').get<string>('host', 'https://gitpod.io/');
return vscode.workspace.getConfiguration('gitpod').get<string>('host') || 'https://gitpod.io/';
}

function getUseLocalApp() {
return vscode.workspace.getConfiguration('gitpod').get<boolean>('remote.useLocalApp', false);
return vscode.workspace.getConfiguration('gitpod').get<boolean>('remote.useLocalApp') || false;
}

function getLocalSshExtensionIpcPort() {
let defaultPort = 43025;
if (vscode.env.appName.includes('Insiders')) {
defaultPort = 43026;
}
return vscode.workspace.getConfiguration('gitpod').get<number>('lsshExtensionIpcPort', defaultPort) || defaultPort;
return vscode.workspace.getConfiguration('gitpod').get<number>('lsshExtensionIpcPort') || defaultPort;
}

export const Configuration = {
Expand Down
4 changes: 2 additions & 2 deletions src/remoteConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ export class RemoteConnector extends Disposable {
GITPOD_LCA_API_PORT: String(apiPort),
GITPOD_LCA_AUTO_TUNNEL: String(false),
GITPOD_LCA_AUTH_REDIRECT_URL: `${vscode.env.uriScheme}://${this.context.extension.id}${RemoteConnector.AUTH_COMPLETE_PATH}`,
GITPOD_LCA_VERBOSE: String(vscode.workspace.getConfiguration('gitpod').get<boolean>('verbose', false)),
GITPOD_LCA_TIMEOUT: String(vscode.workspace.getConfiguration('gitpod').get<string>('timeout', '3h'))
GITPOD_LCA_VERBOSE: String(false),
GITPOD_LCA_TIMEOUT: '3h'
}
});
localAppProcess.unref();
Expand Down

0 comments on commit f613d83

Please sign in to comment.