add detection for integrated cli, verify

This commit is contained in:
Connor Peet
2022-09-26 07:22:58 +02:00
parent 07453efc00
commit 889fbd2f1b
10 changed files with 52 additions and 157 deletions

View File

@@ -3,7 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
use std::{fs::rename, path::Path};
use std::{
fs::{rename, set_permissions},
path::Path,
};
use tempfile::tempdir;
use crate::{
@@ -91,8 +94,6 @@ impl<'a> SelfUpdate<'a> {
#[cfg(target_os = "windows")]
fn copy_file_metadata(from: &Path, to: &Path) -> Result<(), std::io::Error> {
use std::fs::set_permissions;
let permissions = from.metadata()?.permissions();
set_permissions(&to, permissions)?;
Ok(())