File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/mongodb-memory-server-core/src/util Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -123,9 +123,16 @@ export function envToBool(env: string = ''): boolean {
123123}
124124
125125// enable debug if "MONGOMS_DEBUG" is true
126- if ( envToBool ( resolveConfig ( ResolveConfigVariables . DEBUG ) ) ) {
126+ if ( envToBool ( resolveConfig ( ResolveConfigVariables . DEBUG ) ) && ! debug . enabled ) {
127127 debug . enable ( 'MongoMS:*' ) ;
128+ log ( 'Debug Mode Enabled, through Environment Variable' ) ;
128129}
129130
130- // run this always after debug is enabled
131+ // run this after env debug enable to be able to debug this function too
131132findPackageJson ( ) ;
133+
134+ // enable debug if "config.mongodbMemoryServer.debug" is true
135+ if ( envToBool ( resolveConfig ( ResolveConfigVariables . DEBUG ) ) && ! debug . enabled ) {
136+ debug . enable ( 'MongoMS:*' ) ;
137+ log ( 'Debug Mode Enabled, through package.json' ) ;
138+ }
You can’t perform that action at this time.
0 commit comments