feat: add support for --default-folder, --default-workspace and --disable-telemetry in rust cli

This commit is contained in:
Dan Plischke
2026-03-05 16:14:04 +01:00
parent 0c87a51e30
commit b141217200
2 changed files with 20 additions and 0 deletions

View File

@@ -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>,

View File

@@ -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");