diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-31 01:11:49 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-31 01:11:49 +0900 |
| commit | 609a5bee539e82b18d799d00dc7ce374f5edc41b (patch) | |
| tree | e25d230033ea051c901c63839d28b0ef3d9b926c | |
| parent | 3c0505619920d8656b332ef0a23295b0d13f2253 (diff) | |
internal/rosa: handle nil checksum
This defaults to nil, however it did not accept the untyped Azalea nil.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/state.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go index d937d070..aa03b8ba 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -1274,15 +1274,21 @@ func (ctx *evalContext) pf( } if kc != nil { - checksum, ok := kc.(string) - if !ok { + switch checksum := kc.(type) { + case string: + attr.KnownChecksum = new(mustDecode(checksum)) + break + + case azalea.Nil: + break + + default: err = azalea.TypeError{ Concrete: reflect.TypeOf(kc), Asserted: reflect.TypeFor[string](), } return } - attr.KnownChecksum = new(mustDecode(checksum)) } if helper == nil { |
