@mandors/cli 0.0.2 → 0.0.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/.pre-commit-config.yaml
CHANGED
|
@@ -13,10 +13,10 @@ repos:
|
|
|
13
13
|
exclude: '^tests/'
|
|
14
14
|
- id: go-unit-tests
|
|
15
15
|
|
|
16
|
-
# JavaScript/Node.js linting
|
|
17
|
-
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
# JavaScript/Node.js linting (ESLint 9 requires flat config, skipping for now)
|
|
17
|
+
# - repo: https://github.com/pre-commit/mirrors-eslint
|
|
18
|
+
# rev: v9.39.1
|
|
19
|
+
# hooks:
|
|
20
|
+
# - id: eslint
|
|
21
|
+
# files: npm/lib/
|
|
22
|
+
# types: [javascript]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/npm/lib/install.js
CHANGED
|
@@ -57,13 +57,12 @@ async function install(options = {}) {
|
|
|
57
57
|
*/
|
|
58
58
|
function useBundledBinary(platform, arch) {
|
|
59
59
|
const filename = `mandor-${platform}-${arch}`;
|
|
60
|
-
const
|
|
60
|
+
const bundledBinary = path.join(BUNDLE_DIR, filename, filename);
|
|
61
61
|
|
|
62
|
-
if (!fs.existsSync(
|
|
62
|
+
if (!fs.existsSync(bundledBinary)) {
|
|
63
63
|
return null;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// Extract to cache
|
|
67
66
|
const cacheDir = path.join(os.homedir(), '.mandor', 'bin');
|
|
68
67
|
if (!fs.existsSync(cacheDir)) {
|
|
69
68
|
fs.mkdirSync(cacheDir, { recursive: true });
|
|
@@ -71,10 +70,8 @@ function useBundledBinary(platform, arch) {
|
|
|
71
70
|
|
|
72
71
|
const dest = path.join(cacheDir, filename);
|
|
73
72
|
|
|
74
|
-
// Extract tarball
|
|
75
|
-
const { execSync } = require('child_process');
|
|
76
73
|
try {
|
|
77
|
-
|
|
74
|
+
fs.copyFileSync(bundledBinary, dest);
|
|
78
75
|
fs.chmodSync(dest, '755');
|
|
79
76
|
return dest;
|
|
80
77
|
} catch (e) {
|