Fix flag inheritance for wildcard links
This commit is contained in:
@@ -289,6 +289,12 @@ func ParseYAMLFile(filename, workdir string) ([]LinkInstruction, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error expanding wildcard: %w", err)
|
||||
}
|
||||
// "Clone" the original link instruction for each expanded link
|
||||
for i := range newlinks {
|
||||
newlinks[i].Delete = link.Delete
|
||||
newlinks[i].Hard = link.Hard
|
||||
newlinks[i].Force = link.Force
|
||||
}
|
||||
LogInfo("Expanded wildcard source %s in YAML file %s to %d links",
|
||||
FormatSourcePath(link.Source), FormatSourcePath(filename), len(newlinks))
|
||||
config.Links = append(config.Links, newlinks...)
|
||||
|
Reference in New Issue
Block a user