Three files spelled out the line that marks ~/.local/bin/hermes as Omarchy's: the installer that writes it, Remove Preinstalls, and the migration. Two of them were copies, and a change to what ownership means would have left them matching a line nobody writes any more -- Remove Preinstalls quietly sweeping nothing, the migration mistaking Omarchy's own wrapper for a stranger's. omarchy-install-hermes-cli --owns answers it now, and the other two ask. The installer's own metadata was also a flag behind: --check has been there since this landed and was never listed. A test pins the marker to one file, so a second copy fails rather than drifts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
26 lines
1.1 KiB
Bash
26 lines
1.1 KiB
Bash
echo "Install the Hermes CLI wrapper for existing installs"
|
|
|
|
# Users who removed the preinstalls opted out of the mise wrappers, and Hermes
|
|
# is one of them.
|
|
[[ -f $HOME/.local/state/omarchy/preinstalls-removed ]] && exit 0
|
|
|
|
# Hermes Desktop provides its own Hermes. The installer stands aside for it,
|
|
# removing the mise copy and the Omarchy wrapper an earlier install may have
|
|
# left beside the app. It also reports when the app has not finished setting
|
|
# Hermes up, which is the app's to finish, not this migration's to fail on.
|
|
if omarchy-pkg-present hermes-desktop; then
|
|
omarchy-install-hermes-cli || true
|
|
exit 0
|
|
fi
|
|
|
|
# Anything already answering to hermes that this installer did not write --
|
|
# an official install, a hand-rolled wrapper, even a dangling link -- belongs to
|
|
# the user and stays exactly as it is. The installer is asked rather than
|
|
# matched against here, so there is one answer to who owns that wrapper.
|
|
wrapper="$HOME/.local/bin/hermes"
|
|
if [[ -e $wrapper || -L $wrapper ]] && ! omarchy-install-hermes-cli --owns; then
|
|
exit 0
|
|
fi
|
|
|
|
omarchy-install-hermes-cli
|