Skip to content

nexus_check_updates

miscellaneous · scripts/miscellaneous/nexus_check_updates.m

: nexus_check_updates ()
: info = nexus_check_updates (name, value, …)

Tell whether a newer Nexus release exists.

The command asks the download portal (NEXUS_LICENSE_SERVER, or https://nexusone.org.uk when that is not set) for the latest published version for this platform and compares it with version (). When a newer version exists it prints ‘A newer version X is available. Ask the Nexus team for your private link.’ Without "Auto" nothing is downloaded or installed, and no licence data or other information about you is sent: the request carries only the version and the platform. When the portal cannot be reached the command says so and returns.

Every build of a release has the same version number, so the request also carries the CI build number of an installed build and a newer build of the same version is reported as ‘A newer version 12.0.13 build 412 is available’.

Options: "Server" (base URL), "Timeout" (seconds, default 5).

nexus_check_updates ("Frequency", when) sets how often Nexus checks by itself at startup: "daily" (the default; the first start of each calendar day), "weekly", "startup" (every start) or "never". The setting and the date of the last check are kept in update.json in the Nexus per-user settings folder (~/.config/nexus, or %APPDATA%\\nexus on Windows); setpref ("nexus", "UpdateCheck", when) overrides the file.

nexus_check_updates ("Auto", true) is what the startup file runs (see nexus_update_notify). When a check is due it prints ‘Nexus: checking for updates...’. When this installation is current it prints ‘Nexus: up to date 12.0.13 (build 429).’ (the build number from nexus_build_info, omitted on a development build that has no stamp). When a newer build exists it asks the portal for a short-lived download link with the licence stored by the installer (%ProgramData%\\Nexus\\license.json, or NEXUS_LICENSE_EMAIL and NEXUS_LICENSE_KEY), downloads the installer to %LOCALAPPDATA%\\Nexus\\updates (~/.cache/nexus/updates), checks its size and sha256, and tells you how to run it. In an interactive session it asks ‘Close Nexus and run the installer now? [y/N]’; nothing is ever installed over a running Nexus without that answer. The licence key is sent only in the download-link request and is never printed.