Skip to content

Commit

Permalink
Await, and use commit.sha()
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 4, 2021
1 parent 16070b0 commit a934862
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/env/lib/download-sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ async function downloadGitSource( source, { onProgress, spinner, debug } ) {

log( 'Fetching the specified ref.' );
const remote = await repository.getRemote( 'origin' );
const oid = NodeGit.Oid.fromString( source.ref );
const ref = NodeGit.Commit.lookupPrefix( repository, oid, 6 );
const oid = await NodeGit.Oid.fromString( source.ref );
const commit = await NodeGit.Commit.lookupPrefix( repository, oid, 6 );
const ref = commit.sha();
await remote.fetch( ref, gitFetchOptions.fetchOpts );
await remote.disconnect();
try {
Expand Down

0 comments on commit a934862

Please sign in to comment.