From 617f818df4f5e59e76fad5b46aae1006e92d05e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Tue, 25 Apr 2023 19:11:05 +0200 Subject: [PATCH] Fix crash when new app is created --- containers/tools.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/containers/tools.go b/containers/tools.go index d092c16..14d716a 100644 --- a/containers/tools.go +++ b/containers/tools.go @@ -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) }