omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Migration 1781587663 aborts the whole migration queue when omarchy-nvim is not installed

Open omarchybot opened this issue 3 months ago • 1 comments

System details: Omarchy quattro @ 7488eade (post-4.0.0), QEMU/KVM VM. Found by an automated QA pass; mechanism reproduced on a disposable worker VM with the source path absent.

A user who has ~/.config/nvim but not the omarchy-nvim package hard-fails migration 1781587663, which aborts the whole migration queue and the rest of omarchy update behind it.

provider_source="/usr/share/omarchy-nvim/config/lua/config/remote_clipboard.lua"

if [[ -d $nvim_config_dir ]]; then
  mkdir -p "$(dirname "$nvim_provider")"
  install -m 0644 "$provider_source" "$nvim_provider"

The guard tests the user's nvim directory, but the file comes from a separate, removable package (install/omarchy-base.packages:98; pacman -Qi omarchy-nvim confirms it is its own package). Anyone running their own Neovim config with omarchy-nvim dropped, on a legacy git-checkout install, or midway through a failed omarchy-upgrade-to-quattro, gets:

Enable secure remote Neovim clipboard support
install: cannot stat '/usr/share/omarchy-nvim/config/lua/config/remote_clipboard.lua': No such file or directory
exit=1

There is no [[ -f $provider_source ]] || exit 0. Contrast 1784809451.sh:16, which was amended in a6a13cf3 to add exactly that guard after the same class of bug.

Two notes for whoever picks this up. First, #6143 reported the packaging side of this (the file missing from the package) and said the failure was absorbed — that is no longer true; under bash -euo pipefail it is fatal. Second, the blast radius is set by bin/omarchy-migrate:93 running each migration bare under the runner's own set -euo pipefail, so one failing migration ends the queue and skips every remaining step of omarchy-update — that part is #7078, and this is one concrete way in.


Correction, after an independent review of this report:

Narrower than filed. This bites when the migration is still pending, ~/.config/nvim exists, and the provider file is absent. Fresh installs mark all shipped migrations complete, and bin/omarchy-upgrade-to-quattro:722 installs omarchy-nvim before migrations and absorbs migration failure at :1189 -- so the "midway through a failed upgrade" population named above is wrong.

omarchybot avatar Aug 16 '26 11:08 omarchybot

Confirmed on current quattro (902fd8ae), and the fix is up as #14536.

On a worker built from the Omarchy ISO, with a scratch HOME holding ~/.config/nvim and a tmux config, I removed omarchy-nvim and ran 1781587663. It exits 1 with install: cannot stat '/usr/share/omarchy-nvim/config/lua/config/remote_clipboard.lua'. bin/omarchy-migrate marks a migration complete only when it succeeds, so every migration after it stays pending. The tmux step in the same migration never runs either. Nothing makes the package required, because omarchy does not depend on omarchy-nvim.

#14536 checks for the provider file as well as ~/.config/nvim. Without the package it skips the copy and the require it would add to options.lua, and still applies the tmux line. With the fix, the same run exits 0. With the package installed, the result is the same as before. The later 1788996284 exits cleanly when no provider exists, so completing this migration without one is safe under the strict-ordering rule. Codex Medium reviewed the fix, including that ordering question, and found nothing to change.

The CLI suite passed on the worker. The shell suite passed except 6 files, which fail the same way on quattro without the change: ascii, branding-about-animation, default-agent, hyprland-startup-cursor-cold, launch-browser and passwordless-grant-lifecycle. This now waits on the maintainer's review of #14536.

omarchybot avatar Oct 08 '26 06:10 omarchybot