mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
fix(@vant/cli): failed to run lint command
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/cli",
|
||||
"version": "4.0.0-beta.4",
|
||||
"version": "4.0.0-beta.5",
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
"bin": {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import execa from 'execa';
|
||||
import { ora } from '../common/logger';
|
||||
import { consola, ora } from '../common/logger';
|
||||
import { SCRIPT_EXTS } from '../common/constant';
|
||||
|
||||
type RunCommandMessages = {
|
||||
@@ -17,6 +17,7 @@ function runCommand(
|
||||
|
||||
return new Promise((resolve) => {
|
||||
execa(cmd, options, {
|
||||
preferLocal: true,
|
||||
env: { FORCE_COLOR: true },
|
||||
})
|
||||
.then(() => {
|
||||
@@ -25,7 +26,7 @@ function runCommand(
|
||||
})
|
||||
.catch((err: any) => {
|
||||
spinner.fail(messages.failed);
|
||||
console.log(err.stderr || err.stdout);
|
||||
consola.error(err.stderr || err.stdout);
|
||||
resolve(false);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user