build: ensure build task get the proper profile name.

This commit is contained in:
Alexandre Pujol 2024-11-11 21:18:16 +00:00
parent 72d45c2cf5
commit 0206e04b3f
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -6,6 +6,7 @@ package builder
import ( import (
"fmt" "fmt"
"strings"
"github.com/roddhjav/apparmor.d/pkg/paths" "github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild" "github.com/roddhjav/apparmor.d/pkg/prebuild"
@ -33,7 +34,7 @@ type Option struct {
func NewOption(file *paths.Path) *Option { func NewOption(file *paths.Path) *Option {
return &Option{ return &Option{
Name: file.Base(), Name: strings.TrimSuffix(file.Base(), ".apparmor.d"),
File: file, File: file,
} }
} }