mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Write stdout stderr
This commit is contained in:
parent
38888813cf
commit
a7315d29c4
1 changed files with 23 additions and 20 deletions
|
|
@ -31,7 +31,7 @@ export async function installOnWindows() {
|
||||||
ui.writeVerbose(`Destination: ${msiPath}`);
|
ui.writeVerbose(`Destination: ${msiPath}`);
|
||||||
await downloadFile(downloadUrl, msiPath);
|
await downloadFile(downloadUrl, msiPath);
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
ui.emptyLine();
|
ui.emptyLine();
|
||||||
await stopServiceIfRunning();
|
await stopServiceIfRunning();
|
||||||
await uninstallIfInstalled();
|
await uninstallIfInstalled();
|
||||||
|
|
@ -47,13 +47,14 @@ export async function installOnWindows() {
|
||||||
await startService();
|
await startService();
|
||||||
|
|
||||||
ui.emptyLine();
|
ui.emptyLine();
|
||||||
ui.writeInformation("✅ SafeChain Agent installed and started successfully!");
|
ui.writeInformation(
|
||||||
|
"✅ SafeChain Agent installed and started successfully!",
|
||||||
|
);
|
||||||
ui.emptyLine();
|
ui.emptyLine();
|
||||||
// }
|
} finally {
|
||||||
// finally {
|
ui.writeVerbose(`Cleaning up temporary file: ${msiPath}`);
|
||||||
// ui.writeVerbose(`Cleaning up temporary file: ${msiPath}`);
|
cleanup(msiPath);
|
||||||
// cleanup(msiPath);
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function isRunningAsAdmin() {
|
async function isRunningAsAdmin() {
|
||||||
|
|
@ -85,7 +86,9 @@ async function uninstallIfInstalled() {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.status !== 0) {
|
if (result.status !== 0) {
|
||||||
ui.writeVerbose("No existing installation found (fresh install).");
|
ui.writeVerbose(
|
||||||
|
`No existing installation found (fresh install). Output: ${result.stdout} ${result.stderr}`,
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue