Fix crash when new app is created
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
Adam Štrauch 2023-04-25 19:11:05 +02:00
parent c6f9620945
commit 617f818df4
Signed by: cx
GPG key ID: 018304FFA8988F8D

View file

@ -141,6 +141,12 @@ func CPUMemoryStats(applist *[]apps.App, sample int) (*[]apps.App, error) {
func getTechAndVersion(symlink string) (*TechInfo, error) {
link, err := os.Readlink(symlink)
if os.IsNotExist(err) {
return &TechInfo{
Tech: "default",
Version: "",
}, nil
}
if err != nil {
return nil, fmt.Errorf("error reading symlink: %w", err)
}