Skip shared paths

This commit is contained in:
世界 2022-05-05 08:49:15 +08:00
parent cc559556fc
commit 6089c358c2
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -50,6 +50,11 @@ func run0(cmd *cobra.Command, args []string) {
}
}
var skipPaths = []string{
"/usr/lib",
"/usr/lib64",
}
func run1() error {
os.Setenv("LD_LIBRARY_PATH", os.ExpandEnv("$LD_LIBRARY_PATH:/usr/local/lib:$PWD"))
@ -99,10 +104,12 @@ func run1() error {
ldName = it.Name()
return false
}
/*if strings.HasPrefix(it.FullName, "/usr/lib") {
logrus.Info("skipped ", it.FullName)
return false
}*/
for _, path := range skipPaths {
if strings.HasPrefix(it.FullName, path) {
logrus.Info(">> skipped ", it.FullName)
return false
}
}
return true
})
if ldName == "" {