File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,10 @@ class GitHubTree {
5858 return `${ this . repoUrl } /tree/${ commit . slice ( 0 , 10 ) } /${ this . path } ` ;
5959 }
6060
61- async text ( assetPath ) {
61+ async buffer ( assetPath ) {
6262 await this . getLastCommit ( ) ;
6363 const url = this . getAssetUrl ( assetPath ) ;
64- return this . request . text ( url ) ;
64+ return this . request . buffer ( url ) ;
6565 }
6666
6767 /**
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ class Request {
3737 return wrappedFetch ( url , options ) ;
3838 }
3939
40+ async buffer ( url , options = { } ) {
41+ return this . fetch ( url , options ) . then ( res => res . buffer ( ) ) ;
42+ }
43+
4044 async text ( url , options = { } ) {
4145 return this . fetch ( url , options ) . then ( res => res . text ( ) ) ;
4246 }
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class WPTUpdater {
4949 // If filepath starts with '/', the path is relative to WPT project root,
5050 // otherwise it's relative to the path of this updater
5151 async pullTextFile ( dest , filepath ) {
52- const content = await this . tree . text ( filepath ) ;
52+ const content = await this . tree . buffer ( filepath ) ;
5353 const filename = path . join ( dest , filepath ) ;
5454 writeFile ( filename , content ) ;
5555 this . cli . updateSpinner ( `Downloaded ${ filename } ` ) ;
You can’t perform that action at this time.
0 commit comments