cli-eb-test
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -1,1 +0,1 @@ | ||
{"timestamp":1505492575058,"version":"0.0.1"} | ||
{"timestamp":1505498576941,"version":"0.1.0\n"} |
@@ -0,1 +1,2 @@ | ||
const exec = require('child_process').exec | ||
const fetch = require('node-fetch') | ||
@@ -40,3 +41,3 @@ const fs = require('fs') | ||
Installer.prototype.install = function () { | ||
Installer.prototype.install = function (newVersion) { | ||
return fetch(url, { | ||
@@ -71,6 +72,20 @@ compress: false | ||
// Set +x permissions on the executable | ||
this.setExecPermissions(this.target) | ||
// Create the runner file | ||
this.createRunner() | ||
if (newVersion) { | ||
return newVersion | ||
} | ||
return new Promise((resolve, reject) => { | ||
exec(`${this.target} -v`, (error, stdout, stderr) => { | ||
if (error) return reject(error) | ||
resolve(stdout) | ||
}) | ||
}) | ||
}).then(installedVersion => { | ||
const updateCheck = new UpdateCheck({ | ||
@@ -80,3 +95,3 @@ cachePath: this.cachePath | ||
updateCheck.writeCache('0.0.1') | ||
updateCheck.writeCache(installedVersion) | ||
}) | ||
@@ -83,0 +98,0 @@ } |
{ | ||
"name": "cli-eb-test", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "A command-line tool for installation and customisation of the DADI platform", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -21,3 +21,3 @@ const path = require('path') | ||
cachePath, | ||
targetDirectory: path.join(__dirname, 'bin') | ||
targetDirectory: __dirname | ||
}) | ||
@@ -24,0 +24,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50190657
9
167
3