Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions v3/internal/commands/build-assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,15 @@ func sanitizePlistValue(v any) (any, bool) {
return val, true
case map[string]any:
sanitized := sanitizePlistDict(val)
return sanitized, len(sanitized) > 0
return sanitized, true
case []any:
var result []any
result := make([]any, 0, len(val))
for _, item := range val {
if sanitized, keep := sanitizePlistValue(item); keep {
result = append(result, sanitized)
}
}
return result, len(result) > 0
return result, true
default:
return v, true
}
Expand Down
9 changes: 3 additions & 6 deletions v3/internal/commands/build-assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,9 @@ func TestOldFormatPlistMigration(t *testing.T) {

contentStr := string(content)

// No template stub should survive in the output.
stubs := []string{"{{.Ext}}", "{{.Name}}", "{{.Role}}", "{{.IconName}}", "{{.Scheme}}"}
for _, stub := range stubs {
if strings.Contains(contentStr, stub) {
t.Errorf("Output Info.plist still contains template stub %q — old-format template was not sanitized correctly", stub)
}
// No Go template syntax should survive in the output.
if strings.Contains(contentStr, "{{") {
t.Errorf("Output Info.plist still contains Go template syntax — old-format template was not sanitized correctly:\n%s", contentStr)
}

// User-added keys that are real values must be preserved.
Expand Down