@@ -29,7 +29,7 @@ export function parseArgs(args) {
2929 expandEnvs = true ;
3030 }
3131 let recursive = false ;
32- if ( program . recursive === true ) {
32+ if ( parsedCmdOptions . recursive === true ) {
3333 recursive = true ;
3434 }
3535 let verbose = false ;
@@ -90,16 +90,12 @@ export function parseArgsUsingCommander(args) {
9090 . option ( '-f, --file [path]' , 'Custom env file path (default path: ./.env)' )
9191 . option ( '-r, --rc-file [path]' , 'Custom rc file path (default path: ./.env-cmdrc.(js|cjs|mjs|json)' )
9292 . option ( '-x, --expand-envs' , 'Replace $var in args and command with environment variables' )
93+ . option ( '--recursive' , 'Replace $var and $\\{var\\} in env file with the referenced environment variable' )
9394 . option ( '--fallback' , 'Fallback to default env file path, if custom env file path not found' )
9495 . option ( '--no-override' , 'Do not override existing environment variables' )
9596 . option ( '--silent' , 'Ignore any env-cmd errors and only fail on executed program failure.' )
9697 . option ( '--use-shell' , 'Execute the command in a new shell with the given environment' )
9798 . option ( '--verbose' , 'Print helpful debugging information' )
98- << < << << HEAD
99- === = ===
100- . option ( '-x, --expand-envs' , 'Replace $var and $\\{var\\} in args and command with environment variables' )
101- . option ( '--recursive' , 'Replace $var and $\\{var\\} in env file with the referenced environment variable' )
102- >>> > >>> 65 d2198 ( feat : recursive embedding of env vars in env vars )
10399 . allowUnknownOption ( true )
104100 . allowExcessArguments ( true )
105101 . parse ( [ '_' , '_' , ...args ] , { from : 'node' } ) ;
0 commit comments