@moonrepo/cli
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "@moonrepo/cli", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "moon command line and core system.", | ||
@@ -17,4 +17,9 @@ "keywords": [ | ||
"cpu": [ | ||
"arm64", | ||
"x64" | ||
], | ||
"libc": [ | ||
"glibc", | ||
"musl" | ||
], | ||
"files": [ | ||
@@ -41,8 +46,8 @@ "moon", | ||
"optionalDependencies": { | ||
"@moonrepo/core-linux-x64-gnu": "^0.2.0", | ||
"@moonrepo/core-linux-x64-musl": "^0.2.0", | ||
"@moonrepo/core-macos-arm64": "^0.2.0", | ||
"@moonrepo/core-macos-x64": "^0.2.0", | ||
"@moonrepo/core-windows-x64-msvc": "^0.2.0" | ||
"@moonrepo/core-linux-x64-gnu": "^0.2.1", | ||
"@moonrepo/core-linux-x64-musl": "^0.2.1", | ||
"@moonrepo/core-macos-arm64": "^0.2.1", | ||
"@moonrepo/core-macos-x64": "^0.2.1", | ||
"@moonrepo/core-windows-x64-msvc": "^0.2.1" | ||
} | ||
} |
@@ -31,23 +31,19 @@ // Based on the great parcel-css | ||
const triple = parts.join('-'); | ||
let pkgPath; | ||
const pkgPath = path.dirname(require.resolve(`@moonrepo/core-${triple}/package.json`)); | ||
const binPath = path.join(pkgPath, binary); | ||
try { | ||
pkgPath = path.dirname(require.resolve(`@moonrepo/core-${triple}/package.json`)); | ||
if (!fs.existsSync(path.join(pkgPath, binary))) { | ||
throw new Error('Target not built.'); | ||
if (fs.existsSync(binPath)) { | ||
try { | ||
fs.linkSync(binPath, path.join(__dirname, binary)); | ||
} catch { | ||
fs.copyFileSync(binPath, path.join(__dirname, binary)); | ||
} | ||
} else { | ||
throw new Error(); | ||
} | ||
} catch { | ||
pkgPath = path.join(__dirname, '../../target/release'); | ||
console.error('Failed to find "moon" binary.'); | ||
// process.exit(1); | ||
} | ||
try { | ||
fs.linkSync(path.join(pkgPath, binary), path.join(__dirname, binary)); | ||
} catch { | ||
try { | ||
fs.copyFileSync(path.join(pkgPath, binary), path.join(__dirname, binary)); | ||
} catch { | ||
console.error('Failed to find "moon" binary.'); | ||
// process.exit(1); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
0
4809
41