ForceCLI/force

Pushing AuraDefinitionBundle by type does not filter by name

abeyer opened this issue · 1 comments

When pushing aura components with -t AuraDefinitionBundle the pushByMetadataType() function takes an alternate path and early exits for aura (and lwc) components and as a result bypasses filtering on component names specified with -n.

This is part of (but I believe not the only problem) behind #547.

force/command/push.go

Lines 323 to 338 in 3bb82e9

// Handle aura/lwc bundles separately
if filepath.Base(metaFolder) == "aura" || filepath.Base(metaFolder) == "lwc" {
cur := ""
filepath.Walk(metaFolder, func(path string, f os.FileInfo, err error) error {
if f.IsDir() && cur != f.Name() {
cur = f.Name()
fmt.Printf("Pushing " + f.Name() + "\n")
}
if (f.Name() != "aura" && f.Name() != "lwc") && strings.ToLower(f.Name()) != ".ds_store" && f.IsDir() {
absPath, _ := filepath.Abs(path)
pushAuraComponentByPath(absPath)
}
return nil
})
return
}

Resolved by #657