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;
|
||||
const cmd = process.argv[1];
|
||||
const target = path.basename(process.execPath);
|
||||
if (cmd === "--squirrel-install") {
|
||||
runUpdateExe(["--createShortcut=" + target]).then(() => app.quit());
|
||||
return true;
|
||||
} else if (cmd === "--squirrel-updated") {
|
||||
app.quit();
|
||||
return true;
|
||||
} else if (cmd === "--squirrel-uninstall") {
|
||||
runUpdateExe(["--removeShortcut=" + target]).then(() => app.quit());
|
||||
return true;
|
||||
} else if (cmd === "--squirrel-obsolete") {
|
||||
app.quit();
|
||||
return true;
|
||||
|
||||
switch (cmd) {
|
||||
case "--squirrel-install":
|
||||
runUpdateExe(["--createShortcut=" + target]).then(() => app.quit());
|
||||
return true;
|
||||
|
||||
case "--squirrel-updated":
|
||||
case "--squirrel-obsolete":
|
||||
app.quit();
|
||||
return true;
|
||||
|
||||
case "--squirrel-uninstall":
|
||||
runUpdateExe(["--removeShortcut=" + target]).then(() => app.quit());
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checkSquirrelHooks()) {
|
||||
|
Loading…
Reference in New Issue
Block a user