Skip stripping if 'strip' binary is not in path

This commit is contained in:
2025-11-01 12:08:26 +02:00
parent 7e372eef91
commit 52f25c8f3f
+4
View File
@@ -235,6 +235,9 @@ func CompileSourcePackage(archiveFilename, outputDirectory string, skipChecks, k
// Strip all ELF binaries
if !slices.Contains(pkg.Options, "nostrip") {
if _, err := exec.LookPath("strip"); err != nil {
fmt.Println("Skip stripping ELF binaries. 'strip' not in path")
} else {
fmt.Println("Stripping ELF binaries...")
err = filepath.WalkDir(path.Join(tempDirectory, "output_"+pkg.Name), func(path string, d fs.DirEntry, err error) error {
@@ -285,6 +288,7 @@ func CompileSourcePackage(archiveFilename, outputDirectory string, skipChecks, k
return nil, err
}
}
}
// Generate package file list
fmt.Println("Generating package file list...")