fix(desktop updates): pacman command downloads first, installs the local file
CI / Build & Quality Checks (pull_request) Successful in 1m44s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 6s
CI / Playwright smoke (e2e) (pull_request) Successful in 10m38s
CI / Build & Quality Checks (pull_request) Successful in 1m44s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 6s
CI / Playwright smoke (e2e) (pull_request) Successful in 10m38s
`sudo pacman -U <url>` also fetches `<url>.sig` and failed (404) on CachyOS: remote packages fall under RemoteFileSigLevel (signature required) and we don't sign the package. A downloaded file installs under LocalFileSigLevel (optional): `curl -LO <url> && sudo pacman -U ./…`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9aec3691ac
commit
6acdd439d5
@@ -69,9 +69,10 @@ test('install kinds: anything unknown keeps the in-app updater', async () => {
|
||||
test('package installs get their package manager’s command, not an Install button', async () => {
|
||||
const { packageUpdateHelp, isPackageManagedError } = await import('./updateErrors');
|
||||
const pacman = packageUpdateHelp('pacman')!;
|
||||
// Not `pacman -U <url>`: that also wants `<url>.sig`, which we don't publish.
|
||||
assert.equal(
|
||||
pacman.command,
|
||||
'sudo pacman -U https://code.lotusguild.org/LotusGuild/cinny-desktop/releases/download/latest/LotusChat-x86_64.pkg.tar.zst',
|
||||
'curl -LO https://code.lotusguild.org/LotusGuild/cinny-desktop/releases/download/latest/LotusChat-x86_64.pkg.tar.zst && sudo pacman -U ./LotusChat-x86_64.pkg.tar.zst',
|
||||
);
|
||||
assert.match(pacman.url, /LotusChat-x86_64\.pkg\.tar\.zst$/);
|
||||
const deb = packageUpdateHelp('deb')!;
|
||||
|
||||
@@ -67,7 +67,14 @@ export type PackageUpdateHelp = { command?: string; url: string; download: strin
|
||||
export const packageUpdateHelp = (kind: InstallKind): PackageUpdateHelp | undefined => {
|
||||
if (kind === 'pacman') {
|
||||
const url = `${RELEASE_DOWNLOAD}/LotusChat-x86_64.pkg.tar.zst`;
|
||||
return { command: `sudo pacman -U ${url}`, url, download: 'Download package' };
|
||||
// Download first, then install the local file: `pacman -U <url>` also
|
||||
// fetches `<url>.sig` and fails without it (we don't sign packages),
|
||||
// while a local file falls under LocalFileSigLevel (signature optional).
|
||||
return {
|
||||
command: `curl -LO ${url} && sudo pacman -U ./LotusChat-x86_64.pkg.tar.zst`,
|
||||
url,
|
||||
download: 'Download package',
|
||||
};
|
||||
}
|
||||
if (kind === 'deb') {
|
||||
const url = `${RELEASE_DOWNLOAD}/LotusChat-x86_64.deb`;
|
||||
|
||||
Reference in New Issue
Block a user