Skip to content

Commit

Permalink
Installed products fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Feb 8, 2023
1 parent 3b7895e commit f47edcc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pkg/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import (
)

const (
SystemPropPath = "/system/console/status-System%20Properties.json"
SystemPropTimezone = "user.timezone"
SlingPropPath = "/system/console/status-slingprops.json"
SlingSettingsPath = "/system/console/status-slingsettings.json"
SlingSettingRunModes = "Run Modes"
SystemProductInfoPath = "/system/console/productinfo"
SystemPropPath = "/system/console/status-System%20Properties.json"
SystemPropTimezone = "user.timezone"
SlingPropPath = "/system/console/status-slingprops.json"
SlingSettingsPath = "/system/console/status-slingsettings.json"
SlingSettingRunModes = "Run Modes"
SystemProductInfoPath = "/system/console/productinfo"
SystemProductInfoMarker = ">Installed Products</th>"
)

var (
Expand Down Expand Up @@ -123,7 +124,7 @@ func (sm Status) AemVersion() (string, error) {
if err != nil {
return instance.AemVersionUnknown, fmt.Errorf("cannot read system product info on instance '%s': %w", sm.instance.id, err)
}
html := string(bytes)
html := stringsx.AfterLast(string(bytes), SystemProductInfoMarker)
matches := aemVersionRegex.FindStringSubmatch(html)
if matches != nil {
return matches[1], nil
Expand Down

0 comments on commit f47edcc

Please sign in to comment.