mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
feat: add support for --default-folder, --default-workspace and --disable-telemetry in rust cli
This commit is contained in:
@@ -216,6 +216,15 @@ pub struct ServeWebArgs {
|
||||
/// Specifies the directory that server data is kept in.
|
||||
#[clap(long)]
|
||||
pub server_data_dir: Option<String>,
|
||||
/// The workspace folder to open when no input is specified in the browser URL.
|
||||
#[clap(long)]
|
||||
pub default_folder: Option<String>,
|
||||
/// The workspace to open when no input is specified in the browser URL.
|
||||
#[clap(long)]
|
||||
pub default_workspace: Option<String>,
|
||||
/// Disables telemetry.
|
||||
#[clap(long)]
|
||||
pub disable_telemetry: bool,
|
||||
/// Use a specific commit SHA for the client.
|
||||
#[clap(long)]
|
||||
pub commit_id: Option<String>,
|
||||
|
||||
@@ -813,6 +813,17 @@ impl ConnectionManager {
|
||||
cmd.arg("--connection-token-file");
|
||||
cmd.arg(ct);
|
||||
}
|
||||
if let Some(a) = &args.args.default_folder {
|
||||
cmd.arg("--default-folder");
|
||||
cmd.arg(a);
|
||||
}
|
||||
if let Some(a) = &args.args.default_workspace {
|
||||
cmd.arg("--default-workspace");
|
||||
cmd.arg(a);
|
||||
}
|
||||
if args.args.disable_telemetry {
|
||||
cmd.arg("--disable-telemetry");
|
||||
}
|
||||
|
||||
// removed, otherwise the workbench will not be usable when running the CLI from sources.
|
||||
cmd.env_remove("VSCODE_DEV");
|
||||
|
||||
Reference in New Issue
Block a user