@mandors/cli 0.0.8 → 0.0.10
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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/npm/lib/install.js
CHANGED
|
@@ -57,32 +57,19 @@ async function install(options = {}) {
|
|
|
57
57
|
*/
|
|
58
58
|
function useBundledBinary(platform, arch) {
|
|
59
59
|
const filename = `mandor-${platform}-${arch}`;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const bundledBinaryDir = path.join(BUNDLE_DIR, filename, 'mandor');
|
|
63
|
-
const bundledBinaryFile = path.join(BUNDLE_DIR, filename);
|
|
60
|
+
// Tarball extracts to npm/binaries/ as just "mandor" (not in subdir)
|
|
61
|
+
const bundledBinary = path.join(BUNDLE_DIR, 'mandor');
|
|
64
62
|
|
|
65
63
|
console.log(`DEBUG: Looking for binary for ${platform}-${arch}`);
|
|
66
64
|
console.log(`DEBUG: BUNDLE_DIR: ${BUNDLE_DIR}`);
|
|
67
65
|
console.log(`DEBUG: Files in BUNDLE_DIR: ${fs.readdirSync(BUNDLE_DIR).join(', ')}`);
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (fs.existsSync(bundledBinaryDir)) {
|
|
73
|
-
bundledBinary = bundledBinaryDir;
|
|
74
|
-
foundMethod = 'directory structure';
|
|
75
|
-
} else if (fs.existsSync(bundledBinaryFile) && fs.statSync(bundledBinaryFile).isFile()) {
|
|
76
|
-
bundledBinary = bundledBinaryFile;
|
|
77
|
-
foundMethod = 'direct file';
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (!bundledBinary) {
|
|
81
|
-
console.log(`DEBUG: No bundled binary found`);
|
|
67
|
+
if (!fs.existsSync(bundledBinary)) {
|
|
68
|
+
console.log(`DEBUG: No bundled binary found at: ${bundledBinary}`);
|
|
82
69
|
return null;
|
|
83
70
|
}
|
|
84
71
|
|
|
85
|
-
console.log(`DEBUG: Found bundled binary
|
|
72
|
+
console.log(`DEBUG: Found bundled binary: ${bundledBinary}`);
|
|
86
73
|
|
|
87
74
|
const cacheDir = path.join(os.homedir(), '.mandor', 'bin');
|
|
88
75
|
if (!fs.existsSync(cacheDir)) {
|