Fix link
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adam Štrauch 2023-04-24 22:42:31 +02:00
parent af1e69e594
commit c6f9620945
Signed by: cx
GPG key ID: 018304FFA8988F8D

View file

@ -140,8 +140,6 @@ func CPUMemoryStats(applist *[]apps.App, sample int) (*[]apps.App, error) {
}
func getTechAndVersion(symlink string) (*TechInfo, error) {
symlink = strings.TrimSuffix(symlink, "/bin")
link, err := os.Readlink(symlink)
if err != nil {
return nil, fmt.Errorf("error reading symlink: %w", err)
@ -151,6 +149,7 @@ func getTechAndVersion(symlink string) (*TechInfo, error) {
if err != nil {
return nil, fmt.Errorf("error getting absolute path: %w", err)
}
absLink = strings.TrimSuffix(absLink, "/bin")
dirName := filepath.Base(absLink)
parts := strings.Split(dirName, "-")