File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import routeCommand from './commands/route/index.js';
1616import routine from './commands/routine/index.js' ;
1717import site from './commands/site/index.js' ;
1818import t from './i18n/index.js' ;
19+ import logger from './libs/logger.js' ;
1920import { handleCheckVersion , checkCLIVersion } from './utils/checkVersion.js' ;
2021import { getCliConfig } from './utils/fileUtils/index.js' ;
2122
@@ -33,6 +34,9 @@ const main = async () => {
3334 . wrap ( null )
3435 . help ( )
3536 . middleware ( async ( argv ) => {
37+ if ( argv . debug ) {
38+ logger . setLogLevel ( 'debug' ) ;
39+ }
3640 try {
3741 // Pass current command (first positional) so version check can decide prompting behavior
3842 await checkCLIVersion (
@@ -53,6 +57,11 @@ const main = async () => {
5357 . options ( 'help' , {
5458 describe : t ( 'main_help_describe' ) . d ( 'Show help' ) ,
5559 alias : 'h'
60+ } )
61+ . options ( 'debug' , {
62+ describe : t ( 'dev_option_debugger' ) . d ( 'Output debug logs' ) ,
63+ type : 'boolean' ,
64+ default : false
5665 } ) ;
5766
5867 esa . command (
You can’t perform that action at this time.
0 commit comments