fix(cli): dts pipe (#1532)
This commit is contained in:
parent
3d48d4464b
commit
0f0837f5ca
1 changed files with 17 additions and 3 deletions
|
@ -646,14 +646,28 @@ export class BuildCommand extends Command {
|
|||
jsBindingFilePath,
|
||||
idents,
|
||||
)
|
||||
if (this.pipe && jsBindingFilePath) {
|
||||
if (this.pipe) {
|
||||
if (jsBindingFilePath) {
|
||||
const pipeCommand = `${this.pipe} ${jsBindingFilePath}`
|
||||
console.info(`Run ${chalk.green(pipeCommand)}`)
|
||||
try {
|
||||
execSync(pipeCommand, { stdio: 'inherit', env: commandEnv })
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
chalk.bgYellowBright('Pipe the js binding file to command failed'),
|
||||
chalk.bgYellowBright(
|
||||
'Pipe the js binding file to command failed',
|
||||
),
|
||||
e,
|
||||
)
|
||||
}
|
||||
}
|
||||
const pipeCommand = `${this.pipe} ${dtsFilePath}`
|
||||
console.info(`Run ${chalk.green(pipeCommand)}`)
|
||||
try {
|
||||
execSync(pipeCommand, { stdio: 'inherit', env: commandEnv })
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
chalk.bgYellowBright('Pipe the dts file to command failed'),
|
||||
e,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue