From ab3e4c27fd95c8326a033521e081b0dbb8b6cab9 Mon Sep 17 00:00:00 2001 From: "TZU-YEN, CHANG" Date: Fri, 8 May 2020 01:57:14 +0800 Subject: [PATCH] fix(bin): help and version parse error --- packages/bin/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/bin/src/index.ts b/packages/bin/src/index.ts index 6c021d8..20b07f4 100644 --- a/packages/bin/src/index.ts +++ b/packages/bin/src/index.ts @@ -94,7 +94,11 @@ export default async function main(argv: any): Promise { function bootstrap() { /* istanbul ignore next */ - if (process.env.NODE_ENV === 'test' || parser.help || parser.version) { + if ( + process.env.NODE_ENV === 'test' || + parser.argv.help || + parser.argv.version + ) { return } /* istanbul ignore next */