@enonic/cli-test
Advanced tools
Comparing version 0.0.31 to 0.0.32
{ | ||
"name": "@enonic/cli-test", | ||
"description": "Command-line interface for Enonic XP", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "postinstall": "node script.js install", |
@@ -70,2 +70,3 @@ #!/usr/bin/env node | ||
let binName = packageJson.goBinary.name; | ||
let binNameUnused = binName + ".exe"; | ||
const binPath = packageJson.goBinary.path; | ||
@@ -80,2 +81,3 @@ let version = packageJson.version; | ||
if (process.platform === "win32") { | ||
binNameUnused = binName; | ||
binName += ".exe"; | ||
@@ -86,5 +88,6 @@ } | ||
return { | ||
binName: binName, | ||
binPath: binPath, | ||
version: version | ||
binName, | ||
binNameUnused, | ||
binPath, | ||
version | ||
}; | ||
@@ -109,3 +112,2 @@ } | ||
const source = path.join('dist', `enonic_${PLATFORM_MAPPING[process.platform]}_${ARCH_MAPPING[process.arch]}`, opts.binName); | ||
console.info(source); | ||
@@ -119,8 +121,12 @@ if (!fs.existsSync(source)) { | ||
mkdirp.sync(targetPath); | ||
//const target = path.join('dist', opts.binName); | ||
const target = path.join(targetPath, opts.binName); | ||
console.info(target); | ||
console.info(`Copying the relevant binary for your platform ${process.platform}`); | ||
fs.copyFileSync(source, target, fs.constants.COPYFILE_FICLONE); | ||
try { | ||
fs.unlinkSync(path.join(targetPath, opts.binNameUnused)); | ||
} catch(err) { | ||
// | ||
} | ||
} | ||
@@ -127,0 +133,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95534901
137