Skip to content

Commit

Permalink
windows
Browse files Browse the repository at this point in the history
  • Loading branch information
andimarek committed Feb 17, 2021
1 parent 6c34cec commit 429d4c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions npm/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ const os = require("os");
const {version} = require("./package.json");

const prefix = getPlatformPrefix();
const url = `https://github.com/graphql-java/graphql-anonymizer/releases/download/v${version}/graphql-anonymizer-${version}-${prefix}`;

let url = `https://github.com/graphql-java/graphql-anonymizer/releases/download/v${version}/graphql-anonymizer-${version}-${prefix}`;
if (prefix === 'windows') {
url += '.exe';
}
axios({url, responseType: "stream"})
.then(res => {
return res.data.pipe(createWriteStream(join(__dirname, "graphql-anonymizer")));
Expand Down

0 comments on commit 429d4c0

Please sign in to comment.