mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Make SonarCloud happier about our code quality (#632)
This commit is contained in:
parent
7b0040063b
commit
cd227a456a
@ -36,20 +36,24 @@ function checkSquirrelHooks(): boolean {
|
|||||||
if (process.platform !== "win32") return false;
|
if (process.platform !== "win32") return false;
|
||||||
const cmd = process.argv[1];
|
const cmd = process.argv[1];
|
||||||
const target = path.basename(process.execPath);
|
const target = path.basename(process.execPath);
|
||||||
if (cmd === "--squirrel-install") {
|
|
||||||
|
switch (cmd) {
|
||||||
|
case "--squirrel-install":
|
||||||
runUpdateExe(["--createShortcut=" + target]).then(() => app.quit());
|
runUpdateExe(["--createShortcut=" + target]).then(() => app.quit());
|
||||||
return true;
|
return true;
|
||||||
} else if (cmd === "--squirrel-updated") {
|
|
||||||
|
case "--squirrel-updated":
|
||||||
|
case "--squirrel-obsolete":
|
||||||
app.quit();
|
app.quit();
|
||||||
return true;
|
return true;
|
||||||
} else if (cmd === "--squirrel-uninstall") {
|
|
||||||
|
case "--squirrel-uninstall":
|
||||||
runUpdateExe(["--removeShortcut=" + target]).then(() => app.quit());
|
runUpdateExe(["--removeShortcut=" + target]).then(() => app.quit());
|
||||||
return true;
|
return true;
|
||||||
} else if (cmd === "--squirrel-obsolete") {
|
|
||||||
app.quit();
|
default:
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkSquirrelHooks()) {
|
if (checkSquirrelHooks()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user