omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

omarchy-update-available false positive when a pre-release tag exists (e.g. v4.0.0-beta3)

Open sergioacosta-dev opened this issue 3 months ago • 3 comments

Description

The waybar update-checker script (bin/omarchy-update-available) permanently reports an update is available even when the local install is on the actual latest release tag.

Root cause

latest_tag=$(git ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1)

sort -V (GNU version sort) does not implement SemVer pre-release ordering. It ranks v4.0.0-beta3 above v4.0.0, because it's comparing byte-wise rather than treating -beta3 as a pre-release qualifier that should sort before its corresponding release.

Reproduction

$ git ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 3
v3.8.4
v4.0.0
v4.0.0-beta3

With a fully up-to-date checkout on v4.0.0:

$ omarchy-update-available
Omarchy update available (v4.0.0-beta3)

This will affect every user on v4.0.0 for as long as v4.0.0-beta3 remains the lexically/version-sort-"highest" tag in the repo — the waybar icon and omarchy-update prompt never clear.

Suggested fix

Filter out pre-release tags before taking the max, e.g.:

latest_tag=$(git ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | grep -vE -- '-[A-Za-z]' | sort -V | tail -n 1)

(or swap in a proper SemVer-aware comparator if pre-release tags need to be considered under different circumstances).

Environment

  • Omarchy version: v4.0.0
  • OS: Arch Linux

sergioacosta-dev avatar Aug 16 '26 18:08 sergioacosta-dev

Thank you for the clear reproduction and for preparing #7167. I checked both current quattro and the v4.0.4 tag: omarchy-update-available now checks the Omarchy package through checkupdates, with a separate commit-count check for development checkouts. It no longer sorts remote Git tags, so the prerelease comparison described here is no longer part of that implementation. The same resolution is documented on the earlier report #6754.

This looks suitable to close as resolved for the current implementation. If it still occurs after updating, checking which omarchy-update-available executable is being invoked would help identify whether an older checkout is still on the command path.

sprajs avatar Sep 18 '26 21:09 sprajs

Automated duplication check: this issue looks similar to #6754, which covers the same update checker stuck on pre-release tag. I keep that one open and close this one to keep the discussion in one place.

If you feel this is the wrong decision, please open the issue again with a note on the difference.

bjarneo avatar Sep 21 '26 09:09 bjarneo

copy

On Mon, Sep 21, 2026, 2:56 AM bjarneo @.***> wrote:

bjarneo left a comment (omacom/omarchy#7166) https://github.com/omacom/omarchy/issues/7166#issuecomment-5758628961

Automated duplication check: this issue looks similar to #6754 https://github.com/omacom/omarchy/issues/6754, which covers the same update checker stuck on pre-release tag. I keep that one open and close this one to keep the discussion in one place.

If you feel this is the wrong decision, please open the issue again with a note on the difference.

— Reply to this email directly, view it on GitHub https://github.com/omacom/omarchy/issues/7166?email_source=notifications&email_token=BS6M2KBIDTRXGR3V4BGUVDL5QD3MVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNZVHA3DEOBZGYY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5758628961, or unsubscribe https://github.com/notifications/unsubscribe-auth/BS6M2KGTPBSJMFBS5XA6CJ35QD3MVAVCNFSNUABFKJSXA33TNF2G64TZHM4TSNBQHEZTCNRWHNEXG43VMU5TKMJWGU3DSMJWGA3KC5QC . You are receiving this because you authored the thread.Message ID: @.***>

sergioacosta-dev avatar Sep 21 '26 14:09 sergioacosta-dev