mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
committed by
GitHub
parent
ded87f9d8e
commit
4920694ece
@@ -85,6 +85,8 @@ pub fn try_parse_legacy(
|
|||||||
subcommand: ExtensionSubcommand::Install(InstallExtensionArgs {
|
subcommand: ExtensionSubcommand::Install(InstallExtensionArgs {
|
||||||
id_or_path: exts,
|
id_or_path: exts,
|
||||||
pre_release: args.contains_key("pre-release"),
|
pre_release: args.contains_key("pre-release"),
|
||||||
|
donot_include_pack_and_dependencies: args
|
||||||
|
.contains_key("do-not-include-pack-dependencies"),
|
||||||
force: args.contains_key("force"),
|
force: args.contains_key("force"),
|
||||||
}),
|
}),
|
||||||
desktop_code_options,
|
desktop_code_options,
|
||||||
|
|||||||
@@ -293,6 +293,9 @@ impl ExtensionSubcommand {
|
|||||||
if args.pre_release {
|
if args.pre_release {
|
||||||
target.push("--pre-release".to_string());
|
target.push("--pre-release".to_string());
|
||||||
}
|
}
|
||||||
|
if args.donot_include_pack_and_dependencies {
|
||||||
|
target.push("do-not-include-pack-dependencies".to_string());
|
||||||
|
}
|
||||||
if args.force {
|
if args.force {
|
||||||
target.push("--force".to_string());
|
target.push("--force".to_string());
|
||||||
}
|
}
|
||||||
@@ -333,6 +336,10 @@ pub struct InstallExtensionArgs {
|
|||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
pub pre_release: bool,
|
pub pre_release: bool,
|
||||||
|
|
||||||
|
/// Don't include installing pack and dependencies of the extension
|
||||||
|
#[clap(long)]
|
||||||
|
pub donot_include_pack_and_dependencies: bool,
|
||||||
|
|
||||||
/// Update to the latest version of the extension if it's already installed.
|
/// Update to the latest version of the extension if it's already installed.
|
||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
pub force: bool,
|
pub force: bool,
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ pub struct CodeServerArgs {
|
|||||||
pub show_versions: bool,
|
pub show_versions: bool,
|
||||||
pub category: Option<String>,
|
pub category: Option<String>,
|
||||||
pub pre_release: bool,
|
pub pre_release: bool,
|
||||||
|
pub donot_include_pack_and_dependencies: bool,
|
||||||
pub force: bool,
|
pub force: bool,
|
||||||
pub start_server: bool,
|
pub start_server: bool,
|
||||||
// connection tokens
|
// connection tokens
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class CliMain extends Disposable {
|
|||||||
|
|
||||||
// Install Extension
|
// Install Extension
|
||||||
else if (this.argv['install-extension'] || this.argv['install-builtin-extension']) {
|
else if (this.argv['install-extension'] || this.argv['install-builtin-extension']) {
|
||||||
const installOptions: InstallOptions = { isMachineScoped: !!this.argv['do-not-sync'], installPreReleaseVersion: !!this.argv['pre-release'], profileLocation };
|
const installOptions: InstallOptions = { isMachineScoped: !!this.argv['do-not-sync'], installPreReleaseVersion: !!this.argv['pre-release'], donotIncludePackAndDependencies: !!this.argv['do-not-include-pack-dependencies'], profileLocation };
|
||||||
return instantiationService.createInstance(ExtensionManagementCLI, new ConsoleLogger(LogLevel.Info, false)).installExtensions(this.asExtensionIdOrVSIX(this.argv['install-extension'] || []), this.asExtensionIdOrVSIX(this.argv['install-builtin-extension'] || []), installOptions, !!this.argv['force']);
|
return instantiationService.createInstance(ExtensionManagementCLI, new ConsoleLogger(LogLevel.Info, false)).installExtensions(this.asExtensionIdOrVSIX(this.argv['install-extension'] || []), this.asExtensionIdOrVSIX(this.argv['install-builtin-extension'] || []), installOptions, !!this.argv['force']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ export interface NativeParsedArgs {
|
|||||||
'install-builtin-extension'?: string[]; // undefined or array of 1 or more
|
'install-builtin-extension'?: string[]; // undefined or array of 1 or more
|
||||||
'uninstall-extension'?: string[]; // undefined or array of 1 or more
|
'uninstall-extension'?: string[]; // undefined or array of 1 or more
|
||||||
'update-extensions'?: boolean;
|
'update-extensions'?: boolean;
|
||||||
|
'do-not-include-pack-dependencies'?: boolean;
|
||||||
'locate-extension'?: string[]; // undefined or array of 1 or more
|
'locate-extension'?: string[]; // undefined or array of 1 or more
|
||||||
'enable-proposed-api'?: string[]; // undefined or array of 1 or more
|
'enable-proposed-api'?: string[]; // undefined or array of 1 or more
|
||||||
'open-url'?: boolean;
|
'open-url'?: boolean;
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
|
|||||||
'install-builtin-extension': { type: 'string[]' },
|
'install-builtin-extension': { type: 'string[]' },
|
||||||
'force': { type: 'boolean' },
|
'force': { type: 'boolean' },
|
||||||
'do-not-sync': { type: 'boolean' },
|
'do-not-sync': { type: 'boolean' },
|
||||||
|
'do-not-include-pack-dependencies': { type: 'boolean' },
|
||||||
'trace': { type: 'boolean' },
|
'trace': { type: 'boolean' },
|
||||||
'trace-category-filter': { type: 'string' },
|
'trace-category-filter': { type: 'string' },
|
||||||
'trace-options': { type: 'string' },
|
'trace-options': { type: 'string' },
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class CliMain extends Disposable {
|
|||||||
|
|
||||||
// Install Extension
|
// Install Extension
|
||||||
else if (this.args['install-extension'] || this.args['install-builtin-extension']) {
|
else if (this.args['install-extension'] || this.args['install-builtin-extension']) {
|
||||||
const installOptions: InstallOptions = { isMachineScoped: !!this.args['do-not-sync'], installPreReleaseVersion: !!this.args['pre-release'] };
|
const installOptions: InstallOptions = { isMachineScoped: !!this.args['do-not-sync'], installPreReleaseVersion: !!this.args['pre-release'], donotIncludePackAndDependencies: !!this.args['do-not-include-pack-dependencies'] };
|
||||||
return extensionManagementCLI.installExtensions(this.asExtensionIdOrVSIX(this.args['install-extension'] || []), this.asExtensionIdOrVSIX(this.args['install-builtin-extension'] || []), installOptions, !!this.args['force']);
|
return extensionManagementCLI.installExtensions(this.asExtensionIdOrVSIX(this.args['install-extension'] || []), this.asExtensionIdOrVSIX(this.args['install-builtin-extension'] || []), installOptions, !!this.args['force']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ const isSupportedForPipe = (optionId: keyof RemoteParsedArgs) => {
|
|||||||
case 'update-extensions':
|
case 'update-extensions':
|
||||||
case 'list-extensions':
|
case 'list-extensions':
|
||||||
case 'force':
|
case 'force':
|
||||||
|
case 'do-not-include-pack-dependencies':
|
||||||
case 'show-versions':
|
case 'show-versions':
|
||||||
case 'category':
|
case 'category':
|
||||||
case 'verbose':
|
case 'verbose':
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
|||||||
'category': OPTIONS['category'],
|
'category': OPTIONS['category'],
|
||||||
'force': OPTIONS['force'],
|
'force': OPTIONS['force'],
|
||||||
'do-not-sync': OPTIONS['do-not-sync'],
|
'do-not-sync': OPTIONS['do-not-sync'],
|
||||||
|
'do-not-include-pack-dependencies': OPTIONS['do-not-include-pack-dependencies'],
|
||||||
'pre-release': OPTIONS['pre-release'],
|
'pre-release': OPTIONS['pre-release'],
|
||||||
'start-server': { type: 'boolean', cat: 'e', description: nls.localize('start-server', "Start the server when installing or uninstalling extensions. To be used in combination with 'install-extension', 'install-builtin-extension' and 'uninstall-extension'.") },
|
'start-server': { type: 'boolean', cat: 'e', description: nls.localize('start-server', "Start the server when installing or uninstalling extensions. To be used in combination with 'install-extension', 'install-builtin-extension' and 'uninstall-extension'.") },
|
||||||
|
|
||||||
@@ -194,6 +195,8 @@ export interface ServerParsedArgs {
|
|||||||
force?: boolean; // used by install-extension
|
force?: boolean; // used by install-extension
|
||||||
'do-not-sync'?: boolean; // used by install-extension
|
'do-not-sync'?: boolean; // used by install-extension
|
||||||
'pre-release'?: boolean; // used by install-extension
|
'pre-release'?: boolean; // used by install-extension
|
||||||
|
'do-not-include-pack-dependencies'?: boolean; // used by install-extension
|
||||||
|
|
||||||
|
|
||||||
'start-server'?: boolean;
|
'start-server'?: boolean;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user