Resolve the install manifest path the same way the installer does: `${XDG_STATE_HOME:-${HOME}/.local/state}/atomic/install.json`. We deliberately do NOT use `dirs::state_dir()` — that returns `None` on macOS, but install.sh writes the manifest on macOS too (via the `$HOME` fallback). We must mirror the shell behavior exactly so the router finds what the installer wrote.
(env: &dyn EnvLookup)
| 168 | /// `$HOME` fallback). We must mirror the shell behavior exactly so the |
| 169 | /// router finds what the installer wrote. |
| 170 | fn manifest_path(env: &dyn EnvLookup) -> PathBuf { |
| 171 | let state_dir = match env.var("XDG_STATE_HOME") { |
| 172 | Some(v) if !v.is_empty() => PathBuf::from(v), |
| 173 | _ => { |
| 174 | let home = env.var("HOME").unwrap_or_default(); |
| 175 | PathBuf::from(home).join(".local").join("state") |
| 176 | } |
| 177 | }; |
| 178 | state_dir.join("atomic").join("install.json") |
| 179 | } |
| 180 | |
| 181 | /// Determine the install source for a binary at `current_exe`. |
| 182 | /// |
no test coverage detected