mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Code quality: use early return
This commit is contained in:
parent
5fd3ce0b6e
commit
e9b1c487b7
1 changed files with 9 additions and 8 deletions
|
|
@ -82,16 +82,17 @@ async function uninstallIfInstalled() {
|
||||||
|
|
||||||
const productCode = result.stdout.trim();
|
const productCode = result.stdout.trim();
|
||||||
|
|
||||||
if (productCode) {
|
if (!productCode) {
|
||||||
|
ui.writeVerbose("No existing installation found (fresh install).");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ui.writeInformation("🗑️ Removing previous installation...");
|
ui.writeInformation("🗑️ Removing previous installation...");
|
||||||
ui.writeVerbose(`Found product code: ${productCode}`);
|
ui.writeVerbose(`Found product code: ${productCode}`);
|
||||||
ui.writeVerbose(`Running: msiexec /x ${productCode} /qn /norestart`);
|
ui.writeVerbose(`Running: msiexec /x ${productCode} /qn /norestart`);
|
||||||
await safeSpawn("msiexec", ["/x", productCode, "/qn", "/norestart"], {
|
await safeSpawn("msiexec", ["/x", productCode, "/qn", "/norestart"], {
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
ui.writeVerbose("No existing installation found (fresh install).");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue