Skip to content

Commit 100a1fd

Browse files
committed
Pass the branch to getFiles so the correct files are downloaded
1 parent 75bd685 commit 100a1fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var ghTree = require('github-trees');
88
var GithubContent = require('github-content');
99
var mkdirp = require('fs-mkdirp-stream/mkdirp');
1010

11-
function getFiles(owner, repo, paths) {
12-
var client = new GithubContent({ owner, repo });
11+
function getFiles(owner, repo, branch, paths) {
12+
var client = new GithubContent({ owner, repo, branch });
1313

1414
// Call with client as `this`
1515
return promisify(client.files).call(client, paths);
@@ -36,7 +36,7 @@ async function download(owner, repo, directory, options) {
3636
.filter((node) => node.path.startsWith(directory) && node.type === 'blob')
3737
.map((node) => node.path);
3838

39-
var files = await getFiles(owner, repo, paths);
39+
var files = await getFiles(owner, repo, options.sha, paths);
4040

4141
await Promise.all(files.map(output));
4242
}

0 commit comments

Comments
 (0)