fix(cli): regard to target platform, not current platform
This commit is contained in:
parent
7f2c92fa79
commit
dc1069203f
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@napi-rs/cli",
|
||||
"version": "1.0.0-alpha.9",
|
||||
"version": "1.0.0-alpha.10",
|
||||
"description": "Cli tools for napi-rs",
|
||||
"keywords": ["cli", "rust", "napi", "n-api", "neon"],
|
||||
"author": "LongYinan <lynweklm@gmail.com>",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { execSync } from 'child_process'
|
||||
import os from 'os'
|
||||
import { join, parse, sep } from 'path'
|
||||
|
||||
import chalk from 'chalk'
|
||||
|
@ -104,7 +103,7 @@ export class BuildCommand extends Command {
|
|||
|
||||
debug(`Dylib name: ${chalk.greenBright(dylibName)}`)
|
||||
|
||||
const platform = os.platform()
|
||||
const platform = triple.platform
|
||||
let libExt
|
||||
|
||||
debug(`Platform: ${chalk.greenBright(platform)}`)
|
||||
|
@ -121,6 +120,7 @@ export class BuildCommand extends Command {
|
|||
case 'linux':
|
||||
case 'freebsd':
|
||||
case 'openbsd':
|
||||
case 'android':
|
||||
case 'sunos':
|
||||
dylibName = `lib${dylibName}`
|
||||
libExt = '.so'
|
||||
|
|
Loading…
Reference in a new issue