Skip to content

Commit

Permalink
Merge pull request #16 from Aniket-Engg/github
Browse files Browse the repository at this point in the history
github header
  • Loading branch information
Aniket-Engg committed May 10, 2019
2 parents d220137 + e8f0b66 commit 44e63b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/file.js
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 44e63b4

Please sign in to comment.