Skip to content

Commit

Permalink
github header
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket-Engg committed May 10, 2019
1 parent 98cced4 commit 248bd9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const processFile = async (file, fromGithub, root = false) => {
if(fromGithub){
const metadata = regEx.github.exec(file);
const url = 'https://api.github.com/repos/' + metadata[3] + '/contents/' + metadata[4];
axios.defaults.headers.post['User-Agent'] = 'sol-straightener';
contents = Buffer.from((await axios.get(url)).data.content, 'base64').toString();
contents = contents.replace(regEx.pragma, '').trim();
imports = await processImports(file, contents, path.dirname(metadata[0]));
Expand Down

0 comments on commit 248bd9f

Please sign in to comment.