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 {
|
for _, variable := range p.Variables {
|
||||||
if variable.Name == "exec_path" {
|
if variable.Name == "exec_path" {
|
||||||
for _, value := range variable.Values {
|
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
Add a link
Reference in a new issue