fix vscode extensions update step (#650)

* fix vscode extensions update using the new update-extensions cli

* fix non-linux compilation
This commit is contained in:
samhanic
2024-01-24 03:32:00 +01:00
committed by GitHub
parent ffa62afc66
commit 10e1e170b7
3 changed files with 43 additions and 27 deletions

View File

@@ -8,6 +8,7 @@ use tracing::{debug, warn};
use crate::command::CommandExt;
use crate::error::{SkipStep, TopgradeError};
use crate::execution_context::ExecutionContext;
use crate::steps::generic::is_wsl;
use crate::steps::os::archlinux;
use crate::terminal::print_separator;
use crate::utils::{require, require_option, which, PathExt, REQUIRE_SUDO};
@@ -189,12 +190,6 @@ fn update_bedrock(ctx: &ExecutionContext) -> Result<()> {
Ok(())
}
fn is_wsl() -> Result<bool> {
let output = Command::new("uname").arg("-r").output_checked_utf8()?.stdout;
debug!("Uname output: {}", output);
Ok(output.contains("microsoft"))
}
fn upgrade_alpine_linux(ctx: &ExecutionContext) -> Result<()> {
let apk = require("apk")?;
let sudo = require_option(ctx.sudo().as_ref(), REQUIRE_SUDO.to_string())?;