Improve install script output

This commit is contained in:
Sander Declerck 2025-12-01 15:28:10 +01:00
parent b6ea61170f
commit 34c62c5268
No known key found for this signature in database
2 changed files with 2 additions and 14 deletions

View file

@ -85,16 +85,11 @@ function Install-SafeChain {
Write-Info "Binary installed to: $finalFile"
# Execute safe-chain setup
Write-Info "Running safe-chain setup..."
try {
$env:Path = "$env:Path;$InstallDir"
& $finalFile setup
if ($LASTEXITCODE -eq 0) {
Write-Info "✓ safe-chain installed and configured successfully!"
}
else {
if ($LASTEXITCODE -ne 0) {
Write-Warn "safe-chain was installed but setup encountered issues."
Write-Warn "You can run 'safe-chain setup' manually later."
}
@ -103,8 +98,6 @@ function Install-SafeChain {
Write-Warn "safe-chain was installed but setup encountered issues: $_"
Write-Warn "You can run 'safe-chain setup' manually later."
}
Write-Info "Installation complete!"
}
# Run installation

View file

@ -100,15 +100,10 @@ main() {
info "Binary installed to: $FINAL_FILE"
# Execute safe-chain setup
info "Running safe-chain setup..."
if "$FINAL_FILE" setup; then
info "✓ safe-chain installed and configured successfully!"
else
if ! "$FINAL_FILE" setup; then
warn "safe-chain was installed but setup encountered issues."
warn "You can run 'safe-chain setup' manually later."
fi
info "Installation complete!"
}
main