mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-20 08:55:34 +01:00
fix(build): add a simple check to ensure all resolved variables are defined.
This commit is contained in:
parent
4a27c92d53
commit
8b68132f0e
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue