Skip to content

Commit 82ffe2b

Browse files
authored
Fix remote server invocation (#18)
1 parent 7ff72a2 commit 82ffe2b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

gitpod-remote/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "%displayName%",
44
"description": "%description%",
55
"publisher": "gitpod",
6-
"version": "0.0.51",
6+
"version": "0.0.52",
77
"license": "MIT",
88
"preview": true,
99
"icon": "resources/gitpod.png",

gitpod-remote/src/remoteExtensionInit.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ export async function initializeRemoteExtensions(extensions: ISyncExtension[], c
4343
const codeCliPath = path.join(vscode.env.appRoot, 'bin/remote-cli', appName);
4444
const args = extensions.map(e => '--install-extension ' + e.identifier.id).join(' ');
4545

46+
const execEnv = { ...process.env };
47+
delete execEnv['ELECTRON_RUN_AS_NODE']
4648
try {
47-
context.logger.trace('Trying to initialize remote extensions:', extensions.map(e => e.identifier.id).join('\n'));
48-
const { stderr } = await util.promisify(cp.exec)(`${codeCliPath} ${args}`);
49+
context.logger.info('Trying to initialize remote extensions:', extensions.map(e => e.identifier.id).join('\n'));
50+
const { stderr } = await util.promisify(cp.exec)(`${codeCliPath} ${args}`, { env: execEnv });
4951
if (stderr) {
5052
context.logger.error('Failed to initialize remote extensions:', stderr);
5153
}
@@ -104,9 +106,11 @@ export async function installInitialExtensions(context: GitpodExtensionContext)
104106
const codeCliPath = path.join(vscode.env.appRoot, 'bin/remote-cli', appName);
105107
const args = extensions.map(e => '--install-extension ' + e.toString()).join(' ');
106108

109+
const execEnv = { ...process.env };
110+
delete execEnv['ELECTRON_RUN_AS_NODE']
107111
try {
108-
context.logger.trace('Trying to initialize remote extensions from gitpod.yml:', extensions.map(e => e.toString()).join('\n'));
109-
const { stderr } = await util.promisify(cp.exec)(`${codeCliPath} ${args}`);
112+
context.logger.info('Trying to initialize remote extensions from gitpod.yml:', extensions.map(e => e.toString()).join('\n'));
113+
const { stderr } = await util.promisify(cp.exec)(`${codeCliPath} ${args}`, { env: execEnv });
110114
if (stderr) {
111115
context.logger.error('Failed to initialize remote extensions from gitpod.yml:', stderr);
112116
}

0 commit comments

Comments
 (0)