pub enum InstallMethod {
Release,
Cargo,
Binstall {
crate_name: String,
source: BinstallSource,
},
PackageManager,
Store(StoreKind),
Velopack,
}Expand description
How the running executable came to be where it is, which decides whether update may
replace it.
Variants§
Release
Downloaded from a release and placed by hand: update replaces it.
Cargo
cargo install, under $CARGO_HOME/bin: cargo’s records would no longer match a
replaced file, so update says to run cargo install instead.
Binstall
cargo binstall, under $CARGO_HOME/bin and recorded in
$CARGO_HOME/binstall/crates-v1.json: update says to run cargo binstall again.
Fields
source: BinstallSourceWhere that crate came from.
PackageManager
A system or package-manager location (/usr/bin, the Nix store, Homebrew): the
package manager updates it.
Store(StoreKind)
A store’s own package (Flatpak, Snap, MSIX, Mac App Store): the store updates it, and replacing a file inside it would fail or be undone.
Velopack
A Velopack package (an installed Windows app, a macOS bundle, an AppImage): the app updates itself from its own settings, not by replacing the file.