mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
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:
@@ -91,6 +91,12 @@ pub async fn serve_web(ctx: CommandContext, mut args: ServeWebArgs) -> Result<i3
|
|||||||
if args.commit_id.is_none() {
|
if args.commit_id.is_none() {
|
||||||
cm.clone()
|
cm.clone()
|
||||||
.start_update_checker(Duration::from_secs(update_check_interval));
|
.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);
|
let key = get_server_key_half(&ctx.paths);
|
||||||
|
|||||||
Reference in New Issue
Block a user