Skip to content

Commit

Permalink
Run electron and browser on windows: eclipse-theia#6846
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Yucw committed Dec 8, 2021
1 parent c4c6cab commit cf6c9f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/plugin-dev/src/node/hosted-instance-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as request from 'request';
import URI from '@theia/core/lib/common/uri';
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
import { HostedPluginUriPostProcessor, HostedPluginUriPostProcessorSymbolName } from './hosted-plugin-uri-postprocessor';
import { environment } from '@theia/core';
import { environment, isWindows } from '@theia/core';
import { FileUri } from '@theia/core/lib/node/file-uri';
import { LogType } from '@theia/plugin-ext/lib/common/types';
import { HostedPluginSupport } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin';
Expand Down Expand Up @@ -293,6 +293,10 @@ export abstract class AbstractHostedInstanceManager implements HostedInstanceMan
}
};

if (isWindows) {
options.shell = true;
}

this.hostedInstanceProcess = cp.spawn(command.shift()!, command, options);
this.hostedInstanceProcess.on('error', () => { this.isPluginRunning = false; });
this.hostedInstanceProcess.on('exit', () => { this.isPluginRunning = false; });
Expand Down

0 comments on commit cf6c9f9

Please sign in to comment.