Skip to content

Commit

Permalink
Fix remote server invocation (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 authored Aug 9, 2024
1 parent 7ff72a2 commit 82ffe2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gitpod-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "%displayName%",
"description": "%description%",
"publisher": "gitpod",
"version": "0.0.51",
"version": "0.0.52",
"license": "MIT",
"preview": true,
"icon": "resources/gitpod.png",
Expand Down
12 changes: 8 additions & 4 deletions gitpod-remote/src/remoteExtensionInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ export async function initializeRemoteExtensions(extensions: ISyncExtension[], c
const codeCliPath = path.join(vscode.env.appRoot, 'bin/remote-cli', appName);
const args = extensions.map(e => '--install-extension ' + e.identifier.id).join(' ');

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

const execEnv = { ...process.env };
delete execEnv['ELECTRON_RUN_AS_NODE']
try {
context.logger.trace('Trying to initialize remote extensions from gitpod.yml:', extensions.map(e => e.toString()).join('\n'));
const { stderr } = await util.promisify(cp.exec)(`${codeCliPath} ${args}`);
context.logger.info('Trying to initialize remote extensions from gitpod.yml:', extensions.map(e => e.toString()).join('\n'));
const { stderr } = await util.promisify(cp.exec)(`${codeCliPath} ${args}`, { env: execEnv });
if (stderr) {
context.logger.error('Failed to initialize remote extensions from gitpod.yml:', stderr);
}
Expand Down

0 comments on commit 82ffe2b

Please sign in to comment.