File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,10 @@ class GitHubTree {
58
58
return `${ this . repoUrl } /tree/${ commit . slice ( 0 , 10 ) } /${ this . path } ` ;
59
59
}
60
60
61
- async text ( assetPath ) {
61
+ async buffer ( assetPath ) {
62
62
await this . getLastCommit ( ) ;
63
63
const url = this . getAssetUrl ( assetPath ) ;
64
- return this . request . text ( url ) ;
64
+ return this . request . buffer ( url ) ;
65
65
}
66
66
67
67
/**
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ class Request {
37
37
return wrappedFetch ( url , options ) ;
38
38
}
39
39
40
+ async buffer ( url , options = { } ) {
41
+ return this . fetch ( url , options ) . then ( res => res . buffer ( ) ) ;
42
+ }
43
+
40
44
async text ( url , options = { } ) {
41
45
return this . fetch ( url , options ) . then ( res => res . text ( ) ) ;
42
46
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class WPTUpdater {
49
49
// If filepath starts with '/', the path is relative to WPT project root,
50
50
// otherwise it's relative to the path of this updater
51
51
async pullTextFile ( dest , filepath ) {
52
- const content = await this . tree . text ( filepath ) ;
52
+ const content = await this . tree . buffer ( filepath ) ;
53
53
const filename = path . join ( dest , filepath ) ;
54
54
writeFile ( filename , content ) ;
55
55
this . cli . updateSpinner ( `Downloaded ${ filename } ` ) ;
You can’t perform that action at this time.
0 commit comments