chore: handle updates for os-info, windows and shadow-rs (#6487)

* build(deps): update rust crate windows to 0.59.0

* chore: handle windows update

* chore: handle os_info update

* build(deps): update rust crate shadow-rs to 0.37.0

* chore: handle shadow-rs update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
David Knaack 2025-01-11 14:58:02 +01:00 committed by GitHub
parent b90eab3198
commit dfddd999c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 116 additions and 33 deletions

View File

@ -1252,6 +1252,7 @@
"Android": "🤖 ",
"Arch": "🎗️ ",
"Artix": "🎗️ ",
"CachyOS": "🎗️ ",
"CentOS": "💠 ",
"Debian": "🌀 ",
"DragonFly": "🐉 ",
@ -1273,6 +1274,7 @@
"Mint": "🌿 ",
"NetBSD": "🚩 ",
"NixOS": "❄️ ",
"Nobara": "🎩 ",
"OpenBSD": "🐡 ",
"OpenCloudOS": "☁️ ",
"OracleLinux": "🦴 ",
@ -1287,6 +1289,7 @@
"Ubuntu": "🎯 ",
"Ultramarine": "🔷 ",
"Unknown": "❓ ",
"Uos": "🐲 ",
"Void": " ",
"Windows": "🪟 ",
"openEuler": "🦉 ",
@ -4964,6 +4967,7 @@
"Android": "🤖 ",
"Arch": "🎗️ ",
"Artix": "🎗️ ",
"CachyOS": "🎗️ ",
"CentOS": "💠 ",
"Debian": "🌀 ",
"DragonFly": "🐉 ",
@ -4985,6 +4989,7 @@
"Mint": "🌿 ",
"NetBSD": "🚩 ",
"NixOS": "❄️ ",
"Nobara": "🎩 ",
"OpenBSD": "🐡 ",
"OpenCloudOS": "☁️ ",
"OracleLinux": "🦴 ",
@ -4999,6 +5004,7 @@
"Ubuntu": "🎯 ",
"Ultramarine": "🔷 ",
"Unknown": "❓ ",
"Uos": "🐲 ",
"Void": " ",
"Windows": "🪟 ",
"openEuler": "🦉 ",

113
Cargo.lock generated
View File

@ -2951,9 +2951,9 @@ dependencies = [
[[package]]
name = "shadow-rs"
version = "0.36.1"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd2f59f8b166e94269530e0f47323c8b2a5b2d82ef90363cc7ce1e517e063f78"
checksum = "974eb8222c62a8588bc0f02794dd1ba5b60b3ec88b58e050729d0907ed6af610"
dependencies = [
"const_format",
"is_debug",
@ -3089,7 +3089,7 @@ dependencies = [
"versions",
"which",
"whoami",
"windows 0.58.0",
"windows 0.59.0",
"winres",
"yaml-rust2",
]
@ -3868,12 +3868,12 @@ dependencies = [
[[package]]
name = "windows"
version = "0.58.0"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1"
dependencies = [
"windows-core 0.58.0",
"windows-targets 0.52.6",
"windows-core 0.59.0",
"windows-targets 0.53.0",
]
[[package]]
@ -3899,15 +3899,15 @@ dependencies = [
[[package]]
name = "windows-core"
version = "0.58.0"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce"
dependencies = [
"windows-implement 0.58.0",
"windows-interface 0.58.0",
"windows-result 0.2.0",
"windows-implement 0.59.0",
"windows-interface 0.59.0",
"windows-result 0.3.0",
"windows-strings",
"windows-targets 0.52.6",
"windows-targets 0.53.0",
]
[[package]]
@ -3923,9 +3923,9 @@ dependencies = [
[[package]]
name = "windows-implement"
version = "0.58.0"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
dependencies = [
"proc-macro2",
"quote",
@ -3945,9 +3945,9 @@ dependencies = [
[[package]]
name = "windows-interface"
version = "0.58.0"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01"
dependencies = [
"proc-macro2",
"quote",
@ -3965,21 +3965,20 @@ dependencies = [
[[package]]
name = "windows-result"
version = "0.2.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
checksum = "d08106ce80268c4067c0571ca55a9b4e9516518eaa1a1fe9b37ca403ae1d1a34"
dependencies = [
"windows-targets 0.52.6",
"windows-targets 0.53.0",
]
[[package]]
name = "windows-strings"
version = "0.1.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
checksum = "b888f919960b42ea4e11c2f408fadb55f78a9f236d5eef084103c8ce52893491"
dependencies = [
"windows-result 0.2.0",
"windows-targets 0.52.6",
"windows-targets 0.53.0",
]
[[package]]
@ -4033,13 +4032,29 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_gnullvm 0.52.6",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
dependencies = [
"windows_aarch64_gnullvm 0.53.0",
"windows_aarch64_msvc 0.53.0",
"windows_i686_gnu 0.53.0",
"windows_i686_gnullvm 0.53.0",
"windows_i686_msvc 0.53.0",
"windows_x86_64_gnu 0.53.0",
"windows_x86_64_gnullvm 0.53.0",
"windows_x86_64_msvc 0.53.0",
]
[[package]]
name = "windows-version"
version = "0.1.1"
@ -4061,6 +4076,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
@ -4073,6 +4094,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_aarch64_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
@ -4085,12 +4112,24 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnu"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
@ -4103,6 +4142,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_i686_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
@ -4115,6 +4160,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnu"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
@ -4127,6 +4178,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
@ -4139,6 +4196,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "windows_x86_64_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
[[package]]
name = "winnow"
version = "0.6.22"

View File

@ -72,7 +72,7 @@ semver = "1.0.24"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.135"
sha1 = "0.10.6"
shadow-rs = { version = "0.36.1", default-features = false }
shadow-rs = { version = "0.37.0", default-features = false }
# battery is optional (on by default) because the crate doesn't currently build for Termux
# see: https://github.com/svartalf/rust-battery/issues/33
starship-battery = { version = "0.10.0", optional = true }
@ -102,7 +102,7 @@ features = ["preserve_order", "indexmap2"]
deelevate = "0.2.0"
[target.'cfg(windows)'.dependencies.windows]
version = "0.58.0"
version = "0.59.0"
features = [
"Win32_Foundation",
"Win32_UI_Shell",
@ -115,7 +115,7 @@ features = [
nix = { version = "0.29.0", default-features = false, features = ["feature", "fs", "user"] }
[build-dependencies]
shadow-rs = { version = "0.36.1", default-features = false }
shadow-rs = { version = "0.37.0", default-features = false }
dunce = "1.0.5"
[target.'cfg(windows)'.build-dependencies]

View File

@ -5,7 +5,9 @@ use std::io::Write;
use shadow_rs::SdResult;
fn main() -> SdResult<()> {
shadow_rs::new_hook(gen_presets_hook)?;
shadow_rs::ShadowBuilder::builder()
.hook(gen_presets_hook)
.build()?;
#[cfg(windows)]
{

View File

@ -3345,6 +3345,7 @@ Amazon = "🙂 "
Android = "🤖 "
Arch = "🎗️ "
Artix = "🎗️ "
CachyOS = "🎗️ "
CentOS = "💠 "
Debian = "🌀 "
DragonFly = "🐉 "
@ -3366,6 +3367,7 @@ MidnightBSD = "🌘 "
Mint = "🌿 "
NetBSD = "🚩 "
NixOS = "❄️ "
Nobara = "🎩 "
OpenBSD = "🐡 "
OpenCloudOS = "☁️ "
openEuler = "🦉 "
@ -3382,6 +3384,7 @@ SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = "❓ "
Uos = "🐲 "
Void = " "
Windows = "🪟 "
```

View File

@ -99,6 +99,7 @@ Amazon = " "
Android = " "
Arch = " "
Artix = " "
CachyOS = " "
CentOS = " "
Debian = " "
DragonFly = " "
@ -120,6 +121,7 @@ MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
Nobara = " "
OpenBSD = "󰈺 "
openSUSE = " "
OracleLinux = "󰌷 "

View File

@ -136,6 +136,7 @@ Amazon = "amz "
Android = "andr "
Arch = "rch "
Artix = "atx "
CachyOS = "cach "
CentOS = "cent "
Debian = "deb "
DragonFly = "dfbsd "
@ -157,6 +158,7 @@ MidnightBSD = "mid "
Mint = "mint "
NetBSD = "nbsd "
NixOS = "nix "
Nobara = "nbra "
OpenBSD = "obsd "
OpenCloudOS = "ocos "
openEuler = "oeul "
@ -173,6 +175,7 @@ SUSE = "suse "
Ubuntu = "ubnt "
Ultramarine = "ultm "
Unknown = "unk "
Uos = "uos "
Void = "void "
Windows = "win "

View File

@ -36,6 +36,7 @@ impl Default for OSConfig<'_> {
Type::Android => "🤖 ",
Type::Arch => "🎗️ ",
Type::Artix => "🎗️ ",
Type::CachyOS => "🎗️ ",
Type::CentOS => "💠 ",
Type::Debian => "🌀 ",
Type::DragonFly => "🐉 ",
@ -57,6 +58,7 @@ impl Default for OSConfig<'_> {
Type::Mint => "🌿 ",
Type::NetBSD => "🚩 ",
Type::NixOS => "❄️ ",
Type::Nobara => "🎩 ",
Type::OpenBSD => "🐡 ",
Type::OpenCloudOS => "☁️ ",
Type::openEuler => "🦉 ",
@ -73,6 +75,7 @@ impl Default for OSConfig<'_> {
Type::Ubuntu => "🎯 ",
Type::Ultramarine => "🔷 ",
Type::Unknown => "",
Type::Uos => "🐲 ",
Type::Void => "",
Type::Windows => "🪟 ",
// Future symbols.

View File

@ -336,13 +336,13 @@ mod tests {
Type::Alpine => "🏔️ ",
Type::Amazon => "🙂 ",
Type::Android => "🤖 ",
Type::Arch | Type::Artix => "🎗️ ",
Type::Arch | Type::Artix | Type::CachyOS => "🎗️ ",
Type::CentOS | Type::AlmaLinux | Type::RockyLinux => "💠 ",
Type::Debian => "🌀 ",
Type::DragonFly => "🐉 ",
Type::Emscripten => "🔗 ",
Type::EndeavourOS => "🚀 ",
Type::Fedora => "🎩 ",
Type::Fedora | Type::Nobara => "🎩 ",
Type::FreeBSD => "😈 ",
Type::Garuda => "🦅 ",
Type::Gentoo => "🗜️ ",
@ -373,6 +373,7 @@ mod tests {
Type::Ubuntu => "🎯 ",
Type::Ultramarine => "🔷 ",
Type::Unknown => "",
Type::Uos => "🐲 ",
Type::Void => "",
Type::Windows => "🪟 ",
_ => "",

View File

@ -51,7 +51,7 @@ pub fn is_write_allowed(folder_path: &Path) -> std::result::Result<bool, String>
GetFileSecurityW(
wpath,
(OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION).0,
PSECURITY_DESCRIPTOR::default(),
None,
0,
&mut length,
)
@ -70,7 +70,7 @@ pub fn is_write_allowed(folder_path: &Path) -> std::result::Result<bool, String>
GetFileSecurityW(
wpath,
(OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION).0,
psecurity_descriptor,
Some(psecurity_descriptor),
length,
&mut length,
)