Skip to content

Commit

Permalink
ability to specify install dir (cloudflare#29)
Browse files Browse the repository at this point in the history
Co-authored-by: Avery Harnish <[email protected]>
  • Loading branch information
wighawag and EverlastingBugstopper authored May 3, 2023
1 parent fbeb8c7 commit 55bf77a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/binary-install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const error = msg => {
};

class Binary {
constructor(name, url) {
constructor(name, url, config) {
let errors = [];
if (typeof url !== "string") {
errors.push("url must be a string");
Expand Down Expand Up @@ -42,7 +42,7 @@ class Binary {
}
this.url = url;
this.name = name;
this.installDirectory = join(__dirname, "node_modules", ".bin");
this.installDirectory = config?.installDirectory || join(__dirname, "node_modules", ".bin");

if (!existsSync(this.installDirectory)) {
mkdirSync(this.installDirectory, { recursive: true });
Expand Down

0 comments on commit 55bf77a

Please sign in to comment.