Fix link
continuous-integration/drone/push Build is passing Details

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
1 changed files with 1 additions and 2 deletions

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, "-")