今日已更新 234 条资讯 | 累计 41008 条内容
关于我们

myna 0.15.0: myna update

chovy 2026年09月09日 05:51 1 次阅读 来源:Dev.to

myna 0.15.0: myna update I typed myna update today and got Unknown command "update". Run: myna help . That is a fair answer and a bad one. The installer already knew how to put a myna binary on a machine correctly, so there was no reason the binary could not do the same thing to itself. myna update # replace this binary with the newest release myna update --check # only say whether one is waiting /update works in the TUI too. The parts that are easy to get wrong An in-place self update is one of those jobs that looks like four lines of curl and is not, so it is worth saying what this one actually does. It compares versions numerically. A string compare puts 0.9.0 above 0.10.0, which would have parked every install on the 0.9 series the moment 0.10 shipped. It picks the asset the machine can run. Bun's default x86_64 build uses AVX2, and on a CPU without it the binary dies with an illegal instruction rather than a message you could act on, so an older x86_64 Linux box gets the baseline build. That check happens before the download, not after. It verifies the download against the published SHA256SUMS and refuses to install when the sum is missing or does not match. This is an executable that a background daemon then runs unattended, which is not the place to shrug about provenance. It stages the file in the destination directory and renames it over the target. Two reasons. Writing into the running binary truncates the file the kernel is currently executing. And a rename is only atomic within one filesystem, so staging in /tmp and moving across would give up the property that makes this safe at all. A download that fails leaves the working binary exactly as it was, mode included. Flags worth knowing --check reports and exits 1 when an update is waiting, so a cron job can branch on it without parsing anything. --version <x.y.z> installs a specific release in either direction. Going backwards says "Installed" rather than "Updated", because calling a downgrade an update i

本文内容来源于互联网,版权归原作者所有
查看原文