node-version-use 2.1.2 → 2.1.4
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/dist/cjs/commands/setup.d.cts +3 -3
- package/dist/cjs/commands/setup.d.ts +3 -3
- package/dist/cjs/commands/setup.js +82 -3
- package/dist/cjs/commands/setup.js.map +1 -1
- package/dist/cjs/commands/which.js +11 -13
- package/dist/cjs/commands/which.js.map +1 -1
- package/dist/cjs/scripts/postinstall.d.cts +12 -0
- package/dist/cjs/scripts/postinstall.d.ts +12 -0
- package/dist/cjs/scripts/postinstall.js +428 -0
- package/dist/cjs/scripts/postinstall.js.map +1 -0
- package/dist/esm/commands/setup.d.ts +3 -3
- package/dist/esm/commands/setup.js +83 -4
- package/dist/esm/commands/setup.js.map +1 -1
- package/dist/esm/commands/which.js +13 -15
- package/dist/esm/commands/which.js.map +1 -1
- package/dist/esm/scripts/postinstall.d.ts +12 -0
- package/dist/esm/scripts/postinstall.js +418 -0
- package/dist/esm/scripts/postinstall.js.map +1 -0
- package/package.json +4 -4
- package/scripts/postinstall.cjs +6 -459
package/scripts/postinstall.cjs
CHANGED
|
@@ -1,462 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* Postinstall script for node-version-use
|
|
3
|
-
*
|
|
4
|
-
* Downloads the platform-specific binary and installs it to ~/.nvu/bin/
|
|
5
|
-
* This enables transparent Node version switching.
|
|
6
|
-
*
|
|
7
|
-
* Uses safe atomic download pattern:
|
|
8
|
-
* 1. Download to temp file
|
|
9
|
-
* 2. Extract to temp directory
|
|
10
|
-
* 3. Atomic rename to final location
|
|
11
|
-
*
|
|
12
|
-
* Compatible with Node.js 0.8+
|
|
13
|
-
*/
|
|
14
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
15
2
|
var fs = require('fs');
|
|
16
3
|
var path = require('path');
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var homedir = typeof os.homedir === 'function' ? os.homedir() : require('homedir-polyfill')();
|
|
23
|
-
|
|
24
|
-
// execSync doesn't exist in Node 0.8, use spawn
|
|
25
|
-
var spawn = require('child_process').spawn;
|
|
26
|
-
|
|
27
|
-
// Configuration
|
|
28
|
-
var GITHUB_REPO = 'kmalakoff/node-version-use';
|
|
29
|
-
var BINARY_VERSION = require('../package.json').binaryVersion;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Get the platform-specific archive base name (without extension)
|
|
33
|
-
*/
|
|
34
|
-
function getArchiveBaseName() {
|
|
35
|
-
var platform = os.platform();
|
|
36
|
-
var arch = os.arch();
|
|
37
|
-
|
|
38
|
-
var platformMap = {
|
|
39
|
-
darwin: 'darwin',
|
|
40
|
-
linux: 'linux',
|
|
41
|
-
win32: 'win32',
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var archMap = {
|
|
45
|
-
x64: 'x64',
|
|
46
|
-
arm64: 'arm64',
|
|
47
|
-
amd64: 'x64',
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var platformName = platformMap[platform];
|
|
51
|
-
var archName = archMap[arch];
|
|
52
|
-
|
|
53
|
-
if (!platformName || !archName) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return 'nvu-binary-' + platformName + '-' + archName;
|
|
4
|
+
var compiled = path.join(__dirname, '..', 'dist', 'cjs', 'scripts', 'postinstall.js');
|
|
5
|
+
if (fs.existsSync(compiled)) {
|
|
6
|
+
require(compiled);
|
|
7
|
+
} else {
|
|
8
|
+
console.log('postinstall: Skipping (dist/ not built yet - run npm run build)');
|
|
58
9
|
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Get the extracted binary name (includes .exe on Windows)
|
|
62
|
-
*/
|
|
63
|
-
function getExtractedBinaryName(archiveBaseName) {
|
|
64
|
-
var ext = os.platform() === 'win32' ? '.exe' : '';
|
|
65
|
-
return archiveBaseName + ext;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Get the download URL for the binary archive
|
|
70
|
-
*/
|
|
71
|
-
function getDownloadUrl(archiveBaseName) {
|
|
72
|
-
var ext = os.platform() === 'win32' ? '.zip' : '.tar.gz';
|
|
73
|
-
return 'https://github.com/' + GITHUB_REPO + '/releases/download/binary-v' + BINARY_VERSION + '/' + archiveBaseName + ext;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Copy file (compatible with Node 0.8)
|
|
78
|
-
*/
|
|
79
|
-
function copyFileSync(src, dest) {
|
|
80
|
-
var content = fs.readFileSync(src);
|
|
81
|
-
fs.writeFileSync(dest, content);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Atomic rename with fallback to copy+delete for cross-device moves
|
|
86
|
-
* (compatible with Node 0.8)
|
|
87
|
-
*/
|
|
88
|
-
function atomicRename(src, dest, callback) {
|
|
89
|
-
fs.rename(src, dest, function (err) {
|
|
90
|
-
if (!err) {
|
|
91
|
-
callback(null);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Cross-device link error - fall back to copy + delete
|
|
96
|
-
if (err.code === 'EXDEV') {
|
|
97
|
-
try {
|
|
98
|
-
copyFileSync(src, dest);
|
|
99
|
-
fs.unlinkSync(src);
|
|
100
|
-
callback(null);
|
|
101
|
-
} catch (copyErr) {
|
|
102
|
-
callback(copyErr);
|
|
103
|
-
}
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
callback(err);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Remove directory recursively (compatible with Node 0.8)
|
|
113
|
-
*/
|
|
114
|
-
function rmRecursive(dir) {
|
|
115
|
-
if (!fs.existsSync(dir)) return;
|
|
116
|
-
|
|
117
|
-
var files = fs.readdirSync(dir);
|
|
118
|
-
for (var i = 0; i < files.length; i++) {
|
|
119
|
-
var filePath = path.join(dir, files[i]);
|
|
120
|
-
var stat = fs.statSync(filePath);
|
|
121
|
-
if (stat.isDirectory()) {
|
|
122
|
-
rmRecursive(filePath);
|
|
123
|
-
} else {
|
|
124
|
-
fs.unlinkSync(filePath);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
fs.rmdirSync(dir);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Get temp directory (compatible with Node 0.8)
|
|
132
|
-
*/
|
|
133
|
-
function getTmpDir() {
|
|
134
|
-
return typeof os.tmpdir === 'function' ? os.tmpdir() : process.env.TMPDIR || process.env.TMP || process.env.TEMP || '/tmp';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Download using curl (macOS, Linux, Windows 10+)
|
|
139
|
-
*/
|
|
140
|
-
function downloadWithCurl(url, destPath, callback) {
|
|
141
|
-
var curl = spawn('curl', ['-L', '-f', '-s', '-o', destPath, url]);
|
|
142
|
-
|
|
143
|
-
curl.on('close', function (code) {
|
|
144
|
-
if (code !== 0) {
|
|
145
|
-
// curl exit codes: 22 = HTTP error (4xx/5xx), 56 = receive error (often 404 with -f)
|
|
146
|
-
if (code === 22 || code === 56) {
|
|
147
|
-
callback(new Error('HTTP 404'));
|
|
148
|
-
} else {
|
|
149
|
-
callback(new Error('curl failed with exit code ' + code));
|
|
150
|
-
}
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
callback(null);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
curl.on('error', function (err) {
|
|
157
|
-
callback(err);
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Download using PowerShell (Windows 7+ fallback)
|
|
163
|
-
*/
|
|
164
|
-
function downloadWithPowerShell(url, destPath, callback) {
|
|
165
|
-
var psCommand = 'Invoke-WebRequest -Uri "' + url + '" -OutFile "' + destPath + '" -UseBasicParsing';
|
|
166
|
-
var ps = spawn('powershell', ['-NoProfile', '-Command', psCommand]);
|
|
167
|
-
|
|
168
|
-
ps.on('close', function (code) {
|
|
169
|
-
if (code !== 0) {
|
|
170
|
-
callback(new Error('PowerShell download failed with exit code ' + code));
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
callback(null);
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
ps.on('error', function (err) {
|
|
177
|
-
callback(err);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Download a file - tries curl first, falls back to PowerShell on Windows
|
|
183
|
-
* Node 0.8's OpenSSL doesn't support TLS 1.2+ required by GitHub
|
|
184
|
-
*/
|
|
185
|
-
function downloadFile(url, destPath, callback) {
|
|
186
|
-
downloadWithCurl(url, destPath, function (err) {
|
|
187
|
-
if (!err) {
|
|
188
|
-
callback(null);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// If curl failed and we're on Windows, try PowerShell
|
|
193
|
-
if (os.platform() === 'win32' && err.message && err.message.indexOf('ENOENT') >= 0) {
|
|
194
|
-
downloadWithPowerShell(url, destPath, callback);
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
callback(err);
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Extract archive to a directory (callback-based)
|
|
204
|
-
*/
|
|
205
|
-
function extractArchive(archivePath, destDir, callback) {
|
|
206
|
-
var platform = os.platform();
|
|
207
|
-
|
|
208
|
-
if (platform === 'win32') {
|
|
209
|
-
// Windows: extract zip using PowerShell
|
|
210
|
-
var ps = spawn('powershell', ['-Command', "Expand-Archive -Path '" + archivePath + "' -DestinationPath '" + destDir + "' -Force"]);
|
|
211
|
-
ps.on('close', function (code) {
|
|
212
|
-
if (code !== 0) {
|
|
213
|
-
callback(new Error('Failed to extract archive'));
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
callback(null);
|
|
217
|
-
});
|
|
218
|
-
} else {
|
|
219
|
-
// Unix: extract tar.gz
|
|
220
|
-
var tar = spawn('tar', ['-xzf', archivePath, '-C', destDir]);
|
|
221
|
-
tar.on('close', function (code) {
|
|
222
|
-
if (code !== 0) {
|
|
223
|
-
callback(new Error('Failed to extract archive'));
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
callback(null);
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Install binaries using atomic rename pattern
|
|
233
|
-
* 1. Extract to temp directory
|
|
234
|
-
* 2. Copy binary to temp files in destination directory
|
|
235
|
-
* 3. Atomic rename temp files to final names
|
|
236
|
-
*/
|
|
237
|
-
function extractAndInstall(archivePath, destDir, binaryName, callback) {
|
|
238
|
-
var platform = os.platform();
|
|
239
|
-
var isWindows = platform === 'win32';
|
|
240
|
-
var ext = isWindows ? '.exe' : '';
|
|
241
|
-
|
|
242
|
-
// Create temp extraction directory
|
|
243
|
-
var tempExtractDir = path.join(getTmpDir(), 'nvu-extract-' + Date.now());
|
|
244
|
-
mkdirp.sync(tempExtractDir);
|
|
245
|
-
|
|
246
|
-
extractArchive(archivePath, tempExtractDir, function (extractErr) {
|
|
247
|
-
if (extractErr) {
|
|
248
|
-
rmRecursive(tempExtractDir);
|
|
249
|
-
callback(extractErr);
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
var extractedPath = path.join(tempExtractDir, binaryName);
|
|
254
|
-
if (!fs.existsSync(extractedPath)) {
|
|
255
|
-
rmRecursive(tempExtractDir);
|
|
256
|
-
callback(new Error('Extracted binary not found: ' + binaryName));
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// Binary names to install
|
|
261
|
-
var binaries = ['node', 'npm', 'npx'];
|
|
262
|
-
var timestamp = Date.now();
|
|
263
|
-
var _pending = binaries.length;
|
|
264
|
-
var installError = null;
|
|
265
|
-
|
|
266
|
-
// Step 1: Copy extracted binary to temp files in destination directory
|
|
267
|
-
// This ensures the temp files are on the same filesystem for atomic rename
|
|
268
|
-
for (var i = 0; i < binaries.length; i++) {
|
|
269
|
-
var name = binaries[i];
|
|
270
|
-
var tempDest = path.join(destDir, name + '.tmp-' + timestamp + ext);
|
|
271
|
-
var _finalDest = path.join(destDir, name + ext);
|
|
272
|
-
|
|
273
|
-
try {
|
|
274
|
-
// Copy to temp file in destination directory
|
|
275
|
-
copyFileSync(extractedPath, tempDest);
|
|
276
|
-
|
|
277
|
-
// Set permissions on Unix
|
|
278
|
-
if (!isWindows) {
|
|
279
|
-
fs.chmodSync(tempDest, 493); // 0755
|
|
280
|
-
}
|
|
281
|
-
} catch (err) {
|
|
282
|
-
installError = err;
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
if (installError) {
|
|
288
|
-
// Clean up any temp files we created
|
|
289
|
-
for (var j = 0; j < binaries.length; j++) {
|
|
290
|
-
var tempPath = path.join(destDir, binaries[j] + '.tmp-' + timestamp + ext);
|
|
291
|
-
if (fs.existsSync(tempPath)) {
|
|
292
|
-
try {
|
|
293
|
-
fs.unlinkSync(tempPath);
|
|
294
|
-
} catch (_e) {}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
rmRecursive(tempExtractDir);
|
|
298
|
-
callback(installError);
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// Step 2: Atomic rename temp files to final names
|
|
303
|
-
var _renamesPending = binaries.length;
|
|
304
|
-
var renameError = null;
|
|
305
|
-
|
|
306
|
-
function doRename(index) {
|
|
307
|
-
if (index >= binaries.length) {
|
|
308
|
-
// All renames complete
|
|
309
|
-
rmRecursive(tempExtractDir);
|
|
310
|
-
callback(renameError);
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
var name = binaries[index];
|
|
315
|
-
var tempDest = path.join(destDir, name + '.tmp-' + timestamp + ext);
|
|
316
|
-
var finalDest = path.join(destDir, name + ext);
|
|
317
|
-
|
|
318
|
-
// Remove existing file if present (for atomic replacement)
|
|
319
|
-
if (fs.existsSync(finalDest)) {
|
|
320
|
-
try {
|
|
321
|
-
fs.unlinkSync(finalDest);
|
|
322
|
-
} catch (_e) {}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
atomicRename(tempDest, finalDest, function (err) {
|
|
326
|
-
if (err && !renameError) {
|
|
327
|
-
renameError = err;
|
|
328
|
-
}
|
|
329
|
-
doRename(index + 1);
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
doRename(0);
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Print setup instructions
|
|
339
|
-
*/
|
|
340
|
-
function printInstructions(installed) {
|
|
341
|
-
var nvuBinPath = path.join(homedir, '.nvu', 'bin');
|
|
342
|
-
var platform = os.platform();
|
|
343
|
-
|
|
344
|
-
console.log('');
|
|
345
|
-
console.log('============================================================');
|
|
346
|
-
if (installed) {
|
|
347
|
-
console.log(' nvu binaries installed to ~/.nvu/bin/');
|
|
348
|
-
} else {
|
|
349
|
-
console.log(' nvu installed (binaries not yet available)');
|
|
350
|
-
}
|
|
351
|
-
console.log('============================================================');
|
|
352
|
-
console.log('');
|
|
353
|
-
console.log('To enable transparent Node version switching, add to your shell profile:');
|
|
354
|
-
console.log('');
|
|
355
|
-
|
|
356
|
-
if (platform === 'win32') {
|
|
357
|
-
console.log(' PowerShell (add to $PROFILE):');
|
|
358
|
-
console.log(' $env:PATH = "' + nvuBinPath + ';$env:PATH"');
|
|
359
|
-
console.log('');
|
|
360
|
-
console.log(' CMD (run as administrator):');
|
|
361
|
-
console.log(' setx PATH "' + nvuBinPath + ';%PATH%"');
|
|
362
|
-
} else {
|
|
363
|
-
console.log(' # For bash (~/.bashrc):');
|
|
364
|
-
console.log(' export PATH="$HOME/.nvu/bin:$PATH"');
|
|
365
|
-
console.log('');
|
|
366
|
-
console.log(' # For zsh (~/.zshrc):');
|
|
367
|
-
console.log(' export PATH="$HOME/.nvu/bin:$PATH"');
|
|
368
|
-
console.log('');
|
|
369
|
-
console.log(' # For fish (~/.config/fish/config.fish):');
|
|
370
|
-
console.log(' set -gx PATH $HOME/.nvu/bin $PATH');
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
console.log('');
|
|
374
|
-
console.log('Then restart your terminal or source your shell profile.');
|
|
375
|
-
console.log('');
|
|
376
|
-
console.log("Without this, 'nvu 18 npm test' still works - you just won't have");
|
|
377
|
-
console.log("transparent 'node' command override.");
|
|
378
|
-
console.log('============================================================');
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Main installation function
|
|
383
|
-
*/
|
|
384
|
-
function main() {
|
|
385
|
-
var archiveBaseName = getArchiveBaseName();
|
|
386
|
-
|
|
387
|
-
if (!archiveBaseName) {
|
|
388
|
-
console.log('postinstall: Unsupported platform/architecture for binary.');
|
|
389
|
-
console.log('Platform: ' + os.platform() + ', Arch: ' + os.arch());
|
|
390
|
-
console.log('Binary not installed. You can still use nvu with explicit versions: nvu 18 npm test');
|
|
391
|
-
exit(0);
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
var extractedBinaryName = getExtractedBinaryName(archiveBaseName);
|
|
396
|
-
|
|
397
|
-
var nvuDir = path.join(homedir, '.nvu');
|
|
398
|
-
var binDir = path.join(nvuDir, 'bin');
|
|
399
|
-
|
|
400
|
-
// Create directories
|
|
401
|
-
mkdirp.sync(nvuDir);
|
|
402
|
-
mkdirp.sync(binDir);
|
|
403
|
-
|
|
404
|
-
var downloadUrl = getDownloadUrl(archiveBaseName);
|
|
405
|
-
var ext = os.platform() === 'win32' ? '.zip' : '.tar.gz';
|
|
406
|
-
var tempPath = path.join(getTmpDir(), 'nvu-binary-' + Date.now() + ext);
|
|
407
|
-
|
|
408
|
-
console.log('postinstall: Downloading binary for ' + os.platform() + '-' + os.arch() + '...');
|
|
409
|
-
|
|
410
|
-
downloadFile(downloadUrl, tempPath, function (downloadErr) {
|
|
411
|
-
if (downloadErr) {
|
|
412
|
-
// Clean up temp file if it exists
|
|
413
|
-
if (fs.existsSync(tempPath)) {
|
|
414
|
-
try {
|
|
415
|
-
fs.unlinkSync(tempPath);
|
|
416
|
-
} catch (_e) {}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
if (downloadErr.message && downloadErr.message.indexOf('404') >= 0) {
|
|
420
|
-
console.log('postinstall: Binaries not yet published to GitHub releases.');
|
|
421
|
-
console.log('');
|
|
422
|
-
console.log('To build and install binaries locally:');
|
|
423
|
-
console.log(' cd node_modules/node-version-use/binary');
|
|
424
|
-
console.log(' make install');
|
|
425
|
-
console.log('');
|
|
426
|
-
console.log('Or wait for the next release which will include pre-built binaries.');
|
|
427
|
-
} else {
|
|
428
|
-
console.log('postinstall warning: Failed to install binary: ' + (downloadErr.message || downloadErr));
|
|
429
|
-
console.log('You can still use nvu with explicit versions: nvu 18 npm test');
|
|
430
|
-
console.log('To install binaries manually: cd node_modules/node-version-use/binary && make install');
|
|
431
|
-
}
|
|
432
|
-
printInstructions(false);
|
|
433
|
-
exit(0);
|
|
434
|
-
return;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
console.log('postinstall: Extracting binary...');
|
|
438
|
-
|
|
439
|
-
extractAndInstall(tempPath, binDir, extractedBinaryName, function (extractErr) {
|
|
440
|
-
// Clean up temp file
|
|
441
|
-
if (fs.existsSync(tempPath)) {
|
|
442
|
-
try {
|
|
443
|
-
fs.unlinkSync(tempPath);
|
|
444
|
-
} catch (_e) {}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
if (extractErr) {
|
|
448
|
-
console.log('postinstall warning: Failed to extract binary: ' + (extractErr.message || extractErr));
|
|
449
|
-
console.log('You can still use nvu with explicit versions: nvu 18 npm test');
|
|
450
|
-
printInstructions(false);
|
|
451
|
-
exit(0);
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
console.log('postinstall: Binary installed successfully!');
|
|
456
|
-
printInstructions(true);
|
|
457
|
-
exit(0);
|
|
458
|
-
});
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
main();
|