Skip to content

Commit 90c150b

Browse files
authored
When reachability is not enabled for an org, stay silent. (#1582)
* When reachability is not enabled for an org, stay silent. * Update changelog. * Fix redundant imports warnings * Fix fmt.
1 parent 59039bc commit 90c150b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# FOSSA CLI Changelog
22

3+
## 3.11.5
4+
5+
- Remove spurious log message. ([#1582](https://github.com/fossas/fossa-cli/pull/1582))
6+
37
## 3.11.4
48

59
- Stops logging a secret under `--x-snippet-scan`. ([#1579](https://github.com/fossas/fossa-cli/pull/1580))

src/App/Fossa/Analyze/Upload.hs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module App.Fossa.Analyze.Upload (
77
ScanUnits (..),
88
) where
99

10-
import App.Docs (vulnReachabilityProductDocsUrl)
1110
import App.Fossa.API.BuildLink (getFossaBuildUrl)
1211
import App.Fossa.Config.Analyze (JsonOutput (JsonOutput))
1312
import App.Fossa.Ficus.Types (FicusSnippetScanResults)
@@ -63,7 +62,7 @@ import Effect.Logger (
6362
logStdout,
6463
viaShow,
6564
)
66-
import Fossa.API.Types (Organization (orgSupportsReachability, organizationId), Project (projectIsMonorepo), UploadResponse (..), orgFileUpload)
65+
import Fossa.API.Types (Organization (orgSupportsReachability), Project (projectIsMonorepo), UploadResponse (..), orgFileUpload)
6766
import Path (Abs, Dir, Path)
6867
import Srclib.Types (
6968
FullSourceUnit,
@@ -115,11 +114,9 @@ uploadSuccessfulAnalysis (BaseDir basedir) metadata jsonOutput revision scanUnit
115114
dieOnMonorepoUpload revision
116115
org <- getOrganization
117116

118-
if (orgSupportsReachability org)
119-
then void $ upload revision metadata reachabilityUnits
120-
else do
121-
logInfo . pretty $ "Organization: (" <> show (organizationId org) <> ") does not support reachability. Skipping reachability analysis upload."
122-
logInfo . pretty $ "For reachability, refer to: " <> vulnReachabilityProductDocsUrl
117+
when (orgSupportsReachability org) $
118+
void $
119+
upload revision metadata reachabilityUnits
123120

124121
logInfo ""
125122
logInfo ("Using project name: `" <> pretty (projectName revision) <> "`")

0 commit comments

Comments
 (0)