Skip to content

Commit c6db0b6

Browse files
committed
add comment about it being for template imports
1 parent aafd6e4 commit c6db0b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

preview.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ func (o Output) MarshalJSON() ([]byte, error) {
7272
// and attach any diagnostics to the preset if there are issues. This must be done
7373
// because prebuilds have to be valid without user input.
7474
//
75-
// This will only validate presets that have prebuilds configured and have no existing
76-
// error diagnostics.
75+
// This will only validate presets that have prebuilds configured and have no
76+
// existing error diagnostics. This should only be used when doing Template
77+
// Imports as a protection against invalid presets. A template can still be
78+
// usable if it's presets are invalid. It just cannot be used for prebuilds.
7779
func ValidatePrebuilds(ctx context.Context, input Input, preValid []types.Preset, dir fs.FS) {
7880
for i := range preValid {
7981
pre := &preValid[i]

0 commit comments

Comments
 (0)