Socket
Socket
Sign inDemoInstall

binary-installer

Package Overview
Dependencies
9
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

17

index.js

@@ -66,3 +66,7 @@ const { existsSync, mkdirSync, rmSync } = require('fs');

}
install(fetchOptions, suppressLogs = false) {
install(fetchOptions, options) {
const { allowReinstall, suppressLogs } = options || {
allowReinstall: true,
suppressLogs: false
};
const { url } = this;

@@ -78,5 +82,12 @@ if (!url) {

if (existsSync(this.installDirectory)) {
rmrf(this.installDirectory);
if (this.exists()) {
if (allowReinstall) {
console.log(`\n${this.name} is already installed, reinstalling...`);
this.uninstall();
} else {
console.log(`\n${this.name} is already installed, skipping...`);
return;
}
}
mkdirSync(this.installDirectory, { recursive: true });

@@ -83,0 +94,0 @@ if (!suppressLogs) {

2

package.json
{
"name": "binary-installer",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": "git@github.com:bytemain/binary-installer.git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc