feat(prebuild): add err reporting to builder & directive tasks.

This commit is contained in:
Alexandre Pujol 2024-05-25 22:30:20 +01:00
parent 865ce4c66b
commit 02e3334949
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
19 changed files with 108 additions and 53 deletions

View file

@ -29,7 +29,7 @@ func init() {
})
}
func (b Userspace) Apply(profile string) string {
func (b Userspace) Apply(profile string) (string, error) {
p := aa.DefaultTunables()
p.ParseVariables(profile)
p.ResolveAttachments()
@ -37,7 +37,7 @@ func (b Userspace) Apply(profile string) string {
matches := regAttachments.FindAllString(profile, -1)
if len(matches) > 0 {
strheader := strings.Replace(matches[0], "@{exec_path}", att, -1)
return regAttachments.ReplaceAllLiteralString(profile, strheader)
return regAttachments.ReplaceAllLiteralString(profile, strheader), nil
}
return profile
return profile, nil
}