fix(get.ps1): show error instead of silently swallowing all failures #4
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
primatekuntech/triton-install!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/get-ps1-swallowed-errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A completely bare, silent catch-all at the top level of the script:
try { Invoke-TritonInstaller @args } catch { }. The sibling agent installer (agent/get.ps1) had this exact anti-pattern and it was fixed there (commitae575d7, "show error instead of silently swallowing all failures") — the fix was never carried over to this script.Most expected failure paths in this script already print via
Write-Diebefore throwing, so the practical exposure is narrower than it looks — but any unexpected .NET/cmdlet exception not routed throughWrite-Die(e.g. a raw exception fromInvoke-WebRequestduring a connectivity/TLS problem while downloadinginstall.ps1/compose.yaml) would be swallowed with zero output, leaving the operator with a script that silently did nothing.Fix
Applies the exact fix already used in
agent/get.ps1, verbatim. This top-level bootstrapper has noSCRIPT_VERSIONconstant to bump (unlikeagent/get.ps1), so none is added here.Verification
Fixes amiryahaya/triton#338