//! Path utilities shared by every action and by the manifest factory.
//!
//! Currently exposes a single helper, `expand_tilde`, because the rest
//! of the codebase relies on `std::path::PathBuf` directly.
use ;
/// Expand a leading `~/` or bare `~` in `p` to [`dirs::home_dir`].
///
/// Other paths (absolute without `~`, relative, anything starting with
/// `~user/`) are returned unchanged.
///
/// Neither `cargo` nor `git` performs this expansion themselves, so a
/// manifest that writes `install_to = "~/.local/bin"` or
/// `path = "~/code/foo"` would otherwise create a literal `~` directory
/// next to the orchestrator's cwd. Apply this helper before passing
/// user-supplied paths to subprocesses.