mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-09-16 02:26:12 +00:00
Skip stripping if 'strip' binary is not in path
This commit is contained in:
@@ -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...")
|
||||
|
||||
Reference in New Issue
Block a user