mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-19 17:58:48 +00:00
22 lines
537 B
TypeScript
22 lines
537 B
TypeScript
// Copyright 2025 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { app } from 'electron';
|
|
import type { RelaunchOptions } from 'electron';
|
|
|
|
import OS from './os/osMain.node.js';
|
|
|
|
// app.relaunch() doesn't work in AppImage, so this is a workaround
|
|
export function appRelaunch(): void {
|
|
if (!OS.isAppImage()) {
|
|
app.relaunch();
|
|
return;
|
|
}
|
|
|
|
const options: RelaunchOptions = {
|
|
args: ['--appimage-extract-and-run', ...process.argv],
|
|
execPath: process.env.APPIMAGE,
|
|
};
|
|
app.relaunch(options);
|
|
}
|