stanislav-tkach / os_info

Rust library to detect the operating system type
MIT License
175 stars 52 forks source link

Add support for Kali Linux #350

Closed Cube707 closed 1 year ago

Cube707 commented 1 year ago

I added support for Kali Linux. The example now produces:

OS information: Kali Linux 2023.2.0 [64-bit]
Type: Kali Linux
Version: 2023.2.0
Edition: None
Codename: None
Bitness: 64-bit
Architecture: Some("x86_64")

I hope the test are enugh like this. I am not sure if I didn't see more relevant testcases

Cube707 commented 1 year ago

I now also added support for when the lsb_release command is available. With the package installed the output is:

OS information: Kali Linux 2023.2 (kali-rolling) [64-bit]
Type: Kali Linux
Version: 2023.2
Edition: None
Codename: Some("kali-rolling")
Bitness: 64-bit
Architecture: Some("x86_64")
Cube707 commented 1 year ago

and the tests all Pass on my machine.

But I get a warning related to missing_doc_code_examples which doesn't seem related to my changes so I didn't touch it.

Cube707 commented 1 year ago

also, should I squash the two commit into one or keep them separate?

stanislav-tkach commented 1 year ago

Sorry for the super late response and thank you for the pull request! Please ignore warnings and errors on Windows, I will fix them in the next release that I also hope to publish soon. Also don't worry about the commits. 🙃