File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { hideBin } from 'yargs/helpers' ;
12import yargs from 'yargs' ;
23
34// eslint-disable-next-line import/extensions
@@ -22,15 +23,12 @@ function isValidLogLevel(debug?: string): debug is LogLevel | undefined {
2223}
2324
2425( async ( ) => {
25- // kinda ugly workaround for yargs
26- const myYargs = ( await yargs ( ) ) as unknown as typeof yargs ;
27-
2826 const logger = new ConsoleLogger (
2927 ( isValidLogLevel ( process . env . DEBUG ) && process . env . DEBUG ) ||
3028 ( process . env . NODE_ENV === 'development' ? LogLevel . Debug : LogLevel . Log )
3129 ) ;
3230
33- const { argv } = myYargs
31+ const { argv } = yargs ( hideBin ( process . argv ) )
3432 . usage ( 'NODE RADIUS Server\nUsage: radius-server' )
3533 . example ( 'radius-server --port 1812 -s radiussecret' , 'start on port 1812 with a secret' )
3634 . default ( {
You can’t perform that action at this time.
0 commit comments