From 52ffe8d80c48e0d83d28164a846b083cca8993b3 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 7 Dec 2021 16:24:47 +0800 Subject: [PATCH] feat: call executable file directly --- doric-cli/src/actions.ts | 4 ++-- doric-cli/src/dev.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doric-cli/src/actions.ts b/doric-cli/src/actions.ts index 0c297f7b..faa1caae 100644 --- a/doric-cli/src/actions.ts +++ b/doric-cli/src/actions.ts @@ -4,7 +4,7 @@ import fs from "fs"; import { glob } from "./util"; import path from "path"; export async function build() { - let ret = await Shell.exec("node", ["node_modules/.bin/tsc", "-p", "."], { + let ret = await Shell.exec("node_modules/.bin/tsc", ["-p", "."], { env: process.env, consoleHandler: (info) => { console.log(info); @@ -14,7 +14,7 @@ export async function build() { console.log("Compile error".red); return -1; } - ret = await Shell.exec("node", ["node_modules/.bin/rollup", "-c",], { + ret = await Shell.exec("node_modules/.bin/rollup", ["-c",], { env: process.env, consoleHandler: (info) => { console.log(info); diff --git a/doric-cli/src/dev.ts b/doric-cli/src/dev.ts index 1f9b905f..49f15526 100644 --- a/doric-cli/src/dev.ts +++ b/doric-cli/src/dev.ts @@ -78,10 +78,10 @@ export default async function dev() { } }); - const tscProcess = exec("node node_modules/.bin/tsc -w -p .", { + const tscProcess = exec("node_modules/.bin/tsc -w -p .", { env: process.env, }); - const rollupProcess = exec("node node_modules/.bin/rollup -c -w", { + const rollupProcess = exec("node_modules/.bin/rollup -c -w", { env: process.env, }); [tscProcess, rollupProcess].forEach(e => {