File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,21 @@ const convertHost = (v: any) => {
112112 return v
113113}
114114
115+ /**
116+ * base may be a number (like 0), should convert to empty string
117+ */
118+ const convertBase = ( v : any ) => {
119+ if ( v === 0 ) {
120+ return ''
121+ }
122+ return v
123+ }
124+
115125cli
116126 . option ( '-c, --config <file>' , `[string] use specified config file` )
117- . option ( '--base <path>' , `[string] public base path (default: /)` )
127+ . option ( '--base <path>' , `[string] public base path (default: /)` , {
128+ type : [ convertBase ] ,
129+ } )
118130 . option ( '-l, --logLevel <level>' , `[string] info | warn | error | silent` )
119131 . option ( '--clearScreen' , `[boolean] allow/disable clear screen when logging` )
120132 . option ( '-d, --debug [feat]' , `[string | boolean] show debug logs` )
You can’t perform that action at this time.
0 commit comments