diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-10 19:12:45 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-10 19:34:02 +0900 |
| commit | c33a6a5b7ee130370aeeebf6635977415115f7da (patch) | |
| tree | 730e9faed1b6f8a9325e1ee0254236057af9190f /internal/outcome/finalise.go | |
| parent | 952082bd9b4a5387232da6965fd82e20ee8219a6 (diff) | |
hst: optionally reject insecure options
This prevents inadvertent use of insecure compatibility features.
Closes #30.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/finalise.go')
| -rw-r--r-- | internal/outcome/finalise.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/outcome/finalise.go b/internal/outcome/finalise.go index 17007f07..d74c648c 100644 --- a/internal/outcome/finalise.go +++ b/internal/outcome/finalise.go @@ -32,7 +32,14 @@ type outcome struct { syscallDispatcher } -func (k *outcome) finalise(ctx context.Context, msg message.Msg, id *hst.ID, config *hst.Config) error { +// finalise prepares an outcome for main. +func (k *outcome) finalise( + ctx context.Context, + msg message.Msg, + id *hst.ID, + config *hst.Config, + flags int, +) error { if ctx == nil || id == nil { // unreachable panic("invalid call to finalise") @@ -43,7 +50,7 @@ func (k *outcome) finalise(ctx context.Context, msg message.Msg, id *hst.ID, con } k.ctx = ctx - if err := config.Validate(); err != nil { + if err := config.Validate(flags); err != nil { return err } |
