Skip to content

Commit

Permalink
Fix support for non-github libs
Browse files Browse the repository at this point in the history
PUBLISHED_FROM=d0c3a61b47080423b7deed80a5c16991a7bcfc36
  • Loading branch information
dimonomid authored and cesantabot committed Nov 17, 2017
1 parent dcd75be commit cdbdc4d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions mos/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1518,13 +1518,8 @@ func (lpr *compProviderReal) GetLibLocalPath(
}

if m.GetType() == build.SWModuleTypeGithub {
newHash, err := gitinst.GetCurrentHash(localDir)
if err != nil {
return "", errors.Trace(err)
}

if newHash != curHash {
freportf(logWriter, "Hash is updated: %s -> %s", curHash, newHash)
if newHash, err := gitinst.GetCurrentHash(localDir); err == nil && newHash != curHash {
freportf(logWriter, "Hash is updated: %q -> %q", curHash, newHash)
// The current repo hash has changed after the pull, so we need to
// vanish the lib we might have downloaded before
os.RemoveAll(moscommon.GetBinaryLibsDir(localDir))
Expand Down

0 comments on commit cdbdc4d

Please sign in to comment.