MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / post_update_binary

Function post_update_binary

src/update_cmd.rs:219–224  ·  view source on GitHub ↗

The binary to re-exec for `post-update`: the freshly installed one when the upgrade reported where it landed, otherwise the usual resolution. Never `which_tracedecay()` alone — its current-exe-first order can point at the OLD binary (e.g. a stale Homebrew keg) right after an upgrade.

(installed: Option<&Path>)

Source from the content-addressed store, hash-verified

217/// Never `which_tracedecay()` alone — its current-exe-first order can point
218/// at the OLD binary (e.g. a stale Homebrew keg) right after an upgrade.
219fn post_update_binary(installed: Option<&Path>) -> tracedecay::errors::Result<String> {
220 match installed.filter(|path| path.exists()) {
221 Some(path) => Ok(path.to_string_lossy().into_owned()),
222 None => tracedecay_bin_on_path(),
223 }
224}
225
226fn run_post_update_subcommand(
227 no_heal: bool,

Calls 2

tracedecay_bin_on_pathFunction · 0.85
existsMethod · 0.80