fix(vcpkg): fix permission denied when updating vcpkg if it's installed as root (#1447)

This commit is contained in:
Bodebojo
2025-11-10 12:22:44 +01:00
committed by GitHub
parent b29699fc55
commit 222d800a32

View File

@@ -436,10 +436,10 @@ pub fn run_vcpkg_update(ctx: &ExecutionContext) -> Result<()> {
let is_root_install = false;
let mut command = if is_root_install {
ctx.execute(&vcpkg)
} else {
let sudo = ctx.require_sudo()?;
sudo.execute(ctx, &vcpkg)?
} else {
ctx.execute(&vcpkg)
};
command.args(["upgrade", "--no-dry-run"]).status_checked()