fix(build): ensure the displace file get cleaned when not needed.

This commit is contained in:
Alexandre Pujol 2024-02-29 00:03:39 +00:00
parent 1f3b812cfb
commit 45a6e0bf21
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 10 additions and 3 deletions

View file

@ -110,6 +110,13 @@ func displaceFiles(files []string) error {
return nil
}
// Clean the debian/displace file
func debianDisplaceClean() {
if _, err := paths.New("debian/apparmor.d.displace").Create(); err != nil {
panic(err)
}
}
func overwriteProfile(path *paths.Path) []string {
res := []string{}
lines, err := path.ReadFileAsLines()