Skip to content

Commit 8910ce4

Browse files
authored
Merge pull request #299512 from danplischke/main
Add default-folder, default-workspace and disable-telemetry to serve-web CLI
2 parents e0dedab + 167b3b8 commit 8910ce4

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

cli/src/commands/args.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,15 @@ pub struct ServeWebArgs {
220220
/// Specifies the directory that server data is kept in.
221221
#[clap(long)]
222222
pub server_data_dir: Option<String>,
223+
/// The workspace folder to open when no input is specified in the browser URL.
224+
#[clap(long)]
225+
pub default_folder: Option<String>,
226+
/// The workspace to open when no input is specified in the browser URL.
227+
#[clap(long)]
228+
pub default_workspace: Option<String>,
229+
/// Disables telemetry.
230+
#[clap(long)]
231+
pub disable_telemetry: bool,
223232
/// Use a specific commit SHA for the client.
224233
#[clap(long)]
225234
pub commit_id: Option<String>,

cli/src/commands/serve_web.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,17 @@ impl ConnectionManager {
813813
cmd.arg("--connection-token-file");
814814
cmd.arg(ct);
815815
}
816+
if let Some(a) = &args.args.default_folder {
817+
cmd.arg("--default-folder");
818+
cmd.arg(a);
819+
}
820+
if let Some(a) = &args.args.default_workspace {
821+
cmd.arg("--default-workspace");
822+
cmd.arg(a);
823+
}
824+
if args.args.disable_telemetry {
825+
cmd.arg("--disable-telemetry");
826+
}
816827

817828
// removed, otherwise the workbench will not be usable when running the CLI from sources.
818829
cmd.env_remove("VSCODE_DEV");

0 commit comments

Comments
 (0)