mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +01:00
fix(build): add a simple check to ensure all resolved variables are defined.
This commit is contained in:
parent
4a27c92d53
commit
8b68132f0e
@ -105,7 +105,11 @@ func (p *AppArmorProfile) ResolveAttachments() {
|
||||
for _, variable := range p.Variables {
|
||||
if variable.Name == "exec_path" {
|
||||
for _, value := range variable.Values {
|
||||
p.Attachments = append(p.Attachments, p.resolve(value)...)
|
||||
attachments := p.resolve(value)
|
||||
if len(attachments) == 0 {
|
||||
panic("Variable not defined in: " + value)
|
||||
}
|
||||
p.Attachments = append(p.Attachments, attachments...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user