@take2identity/verosint 0.2.7 → 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.
- package/package.json +1 -1
- package/postinstall.js +5 -5
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -56,8 +56,8 @@ function getInstallationPath(callback) {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
function verifyAndPlaceBinary(binName,
|
|
60
|
-
if (!existsSync(
|
|
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(
|
|
71
|
-
unlinkSync(
|
|
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));
|
|
@@ -228,7 +228,7 @@ function install(callback) {
|
|
|
228
228
|
strategy({
|
|
229
229
|
opts,
|
|
230
230
|
req,
|
|
231
|
-
onSuccess: () => verifyAndPlaceBinary(opts.binName,
|
|
231
|
+
onSuccess: () => verifyAndPlaceBinary(opts.binName, callback),
|
|
232
232
|
onError: callback
|
|
233
233
|
});
|
|
234
234
|
});
|