From 2c58505f6b50c5a89e8fbb8dcf22d678826d1694 Mon Sep 17 00:00:00 2001 From: Ben Beasley Date: Sat, 31 Jan 2026 02:15:05 +0000 Subject: chore(deps): update whoami dependency to v2 (#3118) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the [2.0.0](https://github.com/ardaku/whoami/releases/tag/v2.0.0) series, `whoami` removed all infallible function variants, and removed the `fallible` module, moving those functions to the root module. Therefore, I replaced `whoami::fallible::hostname` with `whoami::hostname` (the same function with the same signature, just moved to the root module). For `whoami::username`, the infallible function that `atuin` was using before is gone, and we must add error handling. I chose to fall back to the string `"unknown-user"` if getting the username fails, just as `"unknown-host"` is already the fallback when getting the hostname fails. This seemed reasonable to me, but it’s worth double-checking if there could be any unintended consequences, especially if `unknown-user` happens to be a real, valid username on the system. The alternatives I can see would be to panic on failure or to amend the signature of `get_username()` and all of its call sites with some kind of more graceful error handling (what?). ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index d9d8426c..919d8a92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ serde = { version = "1.0.202", features = ["derive"] } serde_json = "1.0.119" tokio = { version = "1", features = ["full"] } uuid = { version = "1.9", features = ["v4", "v7", "serde"] } -whoami = "1.5.1" +whoami = "2.1.0" typed-builder = "0.18.2" pretty_assertions = "1.3.0" thiserror = "1.0" -- cgit v1.3.1