@@ -184,6 +184,7 @@ func GetAnalyzerManagerExitCode(err error) int {
184184// Download the latest AnalyzerManager executable if not cached locally.
185185// By default, the zip is downloaded directly from jfrog releases.
186186func DownloadAnalyzerManagerIfNeeded (threadId int ) error {
187+ log .Info ("start running DownloadAnalyzerManagerIfNeeded()" )
187188 downloadPath , err := GetAnalyzerManagerDownloadPath ()
188189 if err != nil {
189190 return err
@@ -199,7 +200,13 @@ func DownloadAnalyzerManagerIfNeeded(threadId int) error {
199200 return err
200201 }
201202 downloadUrl := artDetails .ArtifactoryUrl + remotePath
203+ log .Info ("downloadUrl: " + downloadUrl )
202204 remoteFileDetails , _ , err := client .GetRemoteFileDetails (downloadUrl , & httpClientDetails )
205+ if remoteFileDetails != nil {
206+ log .Info ("remoteFileDetails sha: " + remoteFileDetails .Checksum .Sha256 )
207+ } else {
208+ log .Info ("remoteFileDetails is nil. cant log its sha details" )
209+ }
203210 if err != nil {
204211 return fmt .Errorf ("couldn't get remote file details for %s: %s" , downloadUrl , err .Error ())
205212 }
@@ -209,16 +216,21 @@ func DownloadAnalyzerManagerIfNeeded(threadId int) error {
209216 }
210217 // Find current AnalyzerManager checksum.
211218 checksumFilePath := filepath .Join (analyzerManagerDir , dependencies .ChecksumFileName )
219+ log .Info ("analyzer manager Checksum file path: " + checksumFilePath )
220+
212221 exist , err := fileutils .IsFileExists (checksumFilePath , false )
213222 if err != nil {
214223 return err
215224 }
216225 if exist {
226+ log .Info ("checksum file exists" )
217227 var sha2 []byte
218228 sha2 , err = fileutils .ReadFile (checksumFilePath )
219229 if err != nil {
220230 return err
221231 }
232+ log .Info ("sha2 value of checksumFilePath: " + string (sha2 ))
233+ log .Info ("sha2 value of emoteFileDetails.Checksum.Sha256: " + string (remoteFileDetails .Checksum .Sha256 ))
222234 // If the checksums are identical, there's no need to download.
223235 if remoteFileDetails .Checksum .Sha256 == string (sha2 ) {
224236 return nil
0 commit comments