File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -150,15 +150,20 @@ func (r *defaultReporter) printSummary(orderedAssets []assetMrnName) {
150
150
if r .isCompact {
151
151
r .out .Write ([]byte (NewLineCharacter ))
152
152
if ! r .IsIncognito && assetUrl != "" {
153
- // we do not have a space url, so we extract it form the asset url
154
- // https://console.mondoo.com/space/fleet/2JtqGyVTZULTW0uwQ5YxXW4nh6Y?spaceId=dazzling-golick-767384
155
- // an individual asset url wouldn't make sense here
156
- spaceUrlRegexp := regexp .MustCompile (`^(http.*)/[a-zA-Z0-9-]+(\?.+)$` )
157
- m := spaceUrlRegexp .FindStringSubmatch (assetUrl )
158
- spaceUrl := m [1 ] + m [2 ]
153
+ url := ""
154
+ if len (orderedAssets ) > 1 {
155
+ // we do not have a space url, so we extract it form the asset url
156
+ // https://console.mondoo.com/space/fleet/2JtqGyVTZULTW0uwQ5YxXW4nh6Y?spaceId=dazzling-golick-767384
157
+ // an individual asset url wouldn't make sense here
158
+ spaceUrlRegexp := regexp .MustCompile (`^(http.*)/[a-zA-Z0-9-]+(\?.+)$` )
159
+ m := spaceUrlRegexp .FindStringSubmatch (assetUrl )
160
+ url = m [1 ] + m [2 ]
161
+ } else {
162
+ url = assetUrl
163
+ }
159
164
160
165
r .out .Write ([]byte ("Detailed information is already available via the web UI: " ))
161
- r .out .Write ([]byte (spaceUrl + NewLineCharacter ))
166
+ r .out .Write ([]byte (url + NewLineCharacter ))
162
167
}
163
168
if len (assetsByScore ) > 0 {
164
169
r .out .Write ([]byte ("To get more information on the CLI, please run this scan with \" -o full\" ." + NewLineCharacter ))
You can’t perform that action at this time.
0 commit comments