Skip to content

Commit

Permalink
Add a command line flag to disable loading of extensions (users, dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Dec 1, 2015
1 parent b8b3817 commit e08e52d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/vs/platform/workspace/common/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export interface IEnvironment {

debugPluginHostPort: number;
debugBrkPluginHost: boolean;
disablePlugins: boolean;

logPluginHostCommunication: boolean;
verboseLogging: boolean;
Expand Down
4 changes: 3 additions & 1 deletion src/vs/workbench/electron-main/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export interface ICommandLineArguments {
debugPluginHostPort: number;
debugBrkPluginHost: boolean;
logPluginHostCommunication: boolean;
disablePlugins: boolean;

pluginHomePath: string;
pluginDevelopmentPath: string;
Expand Down Expand Up @@ -202,7 +203,8 @@ function parseCli(): ICommandLineArguments {
gotoLineMode: gotoLineMode,
pluginHomePath: normalizePath(parseString(args, '--extensionHomePath')),
pluginDevelopmentPath: normalizePath(parseString(args, '--extensionDevelopmentPath')),
pluginTestsPath: normalizePath(parseString(args, '--extensionTestsPath'))
pluginTestsPath: normalizePath(parseString(args, '--extensionTestsPath')),
disablePlugins: !!opts['disableExtensions'] || !!opts['disable-extensions']
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/node/pluginHostMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class PluginHostMain {
let collector = new PluginsMessageCollector();
let env = this.contextService.getConfiguration().env;

return PluginHostMain.scanPlugins(collector, BUILTIN_PLUGINS_PATH, env.userPluginsHome, env.pluginDevelopmentPath, env.version)
return PluginHostMain.scanPlugins(collector, BUILTIN_PLUGINS_PATH, !env.disablePlugins ? env.userPluginsHome : void 0, !env.disablePlugins ? env.pluginDevelopmentPath : void 0, env.version)
.then(null, err => {
collector.error('', err);
return [];
Expand Down

0 comments on commit e08e52d

Please sign in to comment.