mirror of https://github.com/microsoft/vscode.git
Fix --commit-id flag for code serve-web (#258904)
* Fix --commit-id flag for code serve-web Fixes a bug where passing --commit-id during `code serve-web` would prevent serve-web from downloading a new version of the client at all. * Update cli/src/commands/serve_web.rs --------- Co-authored-by: Connor Peet <connor@peet.io>
This commit is contained in:
parent
1297e26760
commit
b0271fa725
|
@ -91,6 +91,12 @@ pub async fn serve_web(ctx: CommandContext, mut args: ServeWebArgs) -> Result<i3
|
|||
if args.commit_id.is_none() {
|
||||
cm.clone()
|
||||
.start_update_checker(Duration::from_secs(update_check_interval));
|
||||
} else {
|
||||
// If a commit was provided, invoke get_latest_release() once to ensure we're using that exact version;
|
||||
// get_latest_release() will short-circuit to args.commit_id.
|
||||
if let Err(e) = cm.get_latest_release().await {
|
||||
warning!(cm.log, "error getting latest version: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
let key = get_server_key_half(&ctx.paths);
|
||||
|
|
Loading…
Reference in New Issue