mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
cli: implement better self-updating
- Start separating a "standalone" CLI. This is a little awkward with clap- derive, but I got it working. Detection of whether the CLI _is_ standalone is still todo. - Remove the old ad-hoc update code for code-server, and use the update service instead. - Fix some of the "permission denied" errors people got while updating before. We need to rename the old running binary, not just overwrite it.
This commit is contained in:
@@ -317,11 +317,17 @@ impl std::fmt::Display for ServerHasClosed {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UpdatesNotConfigured();
|
||||
pub struct UpdatesNotConfigured(pub String);
|
||||
|
||||
impl UpdatesNotConfigured {
|
||||
pub fn no_url() -> Self {
|
||||
UpdatesNotConfigured("no service url".to_owned())
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for UpdatesNotConfigured {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "Update service is not configured")
|
||||
write!(f, "Update service is not configured: {}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user