Skip to content

Commit

Permalink
Disables the hash check for git repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Maël Nison committed May 18, 2017
1 parent e56cdb8 commit 37940a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/fetchers/git-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,20 @@ export default class GitFetcher extends BaseFetcher {
.pipe(hashStream)
.pipe(untarStream)
.on('finish', () => {

const expectHash = this.hash;
const actualHash = hashStream.getHash();
if (!expectHash || expectHash === actualHash) {

// This condition is disabled because "expectHash" actually is the commit hash
// This is a design issue that we'll need to fix
if (true || !expectHash || expectHash === actualHash) {
resolve({
hash: actualHash,
});
} else {
reject(new SecurityError(this.reporter.lang('fetchBadHash', expectHash, actualHash)));
}

})
.on('error', function(err) {
reject(new MessageError(this.reporter.lang('fetchErrorCorrupt', err.message, tarballPath)));
Expand Down

0 comments on commit 37940a2

Please sign in to comment.