feat: build and publish Windows NSH packages with verified updates

This commit is contained in:
Kevin Yue committed 2026-11-14 23:10:21 +08:00
1 parent 2c9d227f02
commit 560d2b2de7
113 files changed
+7264 -801

No files matched your search

+3 -1
View File
@@ -15,5 +15,7 @@ serde.workspace = true
serde_json.workspace = true
serde_urlencoded.workspace = true
uuid = { workspace = true, features = ["v5"] }
uzers.workspace = true
xmltree.workspace = true
[target.'cfg(unix)'.dependencies]
uzers.workspace = true
+3
View File
@@ -570,11 +570,14 @@ fn detect_ufw(commands: &CollectorCommands<'_>) -> io::Result<Option<UfwInfo>> {
let Some(ufw) = commands.resolve("ufw") else {
return Ok(None);
};
#[cfg(unix)]
let output = if uzers::get_effective_uid() == 0 {
commands.run_path(&ufw, &["status"])?
} else {
commands.run("sudo", &["-n", &ufw.to_string_lossy(), "status"])?
};
#[cfg(windows)]
let output = commands.run_path(&ufw, &["status"])?;
let Some(output) = output.filter(|output| output.status.success()) else {
return Ok(None);
};