@take2identity/verosint 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.js +6 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@take2identity/verosint",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Official CLI to interact with Verosint API",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postinstall.js CHANGED
@@ -56,8 +56,8 @@ function getInstallationPath(callback) {
56
56
  });
57
57
  }
58
58
 
59
- function verifyAndPlaceBinary(binName, binPath, callback) {
60
- if (!existsSync(join(binPath, binName))) {
59
+ function verifyAndPlaceBinary(binName, callback) {
60
+ if (!existsSync(binName)) {
61
61
  return callback(`Downloaded binary does not contain the binary specified in configuration - ${binName}`);
62
62
  }
63
63
 
@@ -67,8 +67,8 @@ function verifyAndPlaceBinary(binName, binPath, callback) {
67
67
  }
68
68
 
69
69
  // Move the binary file and make sure it is executable
70
- copyFileSync(join(binPath, binName), join(installationPath, binName));
71
- unlinkSync(join(binPath, binName));
70
+ copyFileSync(binName, join(installationPath, binName));
71
+ unlinkSync(binName);
72
72
  chmodSync(join(installationPath, binName), '755');
73
73
 
74
74
  console.log('Placed binary on', join(installationPath, binName));
@@ -173,7 +173,7 @@ function unzip({ opts, req, onSuccess, onError }) {
173
173
 
174
174
  function untar({ opts, req, onSuccess, onError }) {
175
175
  const ungz = zlib.createGunzip();
176
- const untar = tar.Extract({ path: opts.binPath });
176
+ const untar = tar.extract({ path: opts.binPath });
177
177
  ungz.on('error', onError);
178
178
  untar.on('error', onError);
179
179
  untar.on('end', onSuccess);
@@ -228,7 +228,7 @@ function install(callback) {
228
228
  strategy({
229
229
  opts,
230
230
  req,
231
- onSuccess: () => verifyAndPlaceBinary(opts.binName, opts.binPath, callback),
231
+ onSuccess: () => verifyAndPlaceBinary(opts.binName, callback),
232
232
  onError: callback
233
233
  });
234
234
  });