Skip to content

Commit

Permalink
Remove log message. Check for xctest instead of bazel env vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlw committed Mar 22, 2024
1 parent b70f168 commit 818db5d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Source/common/SNTConfigurator.m
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ - (NSRegularExpression *)expressionForPattern:(NSString *)pattern {
- (void)applyOverrides:(NSMutableDictionary *)forcedConfig {
// Overrides should only be applied under debug builds.
#ifdef DEBUG
if ([[[NSProcessInfo processInfo] environment] objectForKey:@"BAZEL_TEST"] &&
if ([[[NSProcessInfo processInfo] processName] isEqualToString:@"xctest"] &&
![[[NSProcessInfo processInfo] environment] objectForKey:@"ENABLE_CONFIG_OVERRIDES"]) {
// By default, config overrides are not applied when runnings tests to help
// mitigate potential issues due to unexpected config values. This behavior
Expand All @@ -1236,7 +1236,6 @@ - (void)applyOverrides:(NSMutableDictionary *)forcedConfig {
return;
}

BOOL overridesApplied = NO;
NSDictionary *overrides = [NSDictionary dictionaryWithContentsOfFile:kConfigOverrideFilePath];
for (NSString *key in overrides) {
id obj = overrides[key];
Expand All @@ -1247,17 +1246,12 @@ - (void)applyOverrides:(NSMutableDictionary *)forcedConfig {
}

forcedConfig[key] = obj;
overridesApplied = YES;

if (self.forcedConfigKeyTypes[key] == [NSRegularExpression class]) {
NSString *pattern = [obj isKindOfClass:[NSString class]] ? obj : nil;
forcedConfig[key] = [self expressionForPattern:pattern];
}
}

if (overridesApplied) {
NSLog(@"WARNING: Running with overrides applied!");
}
#endif
}

Expand Down

0 comments on commit 818db5d

Please sign in to comment.