Fix crash when new app is created
This commit is contained in:
parent
c6f9620945
commit
617f818df4
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue