Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ConfigManager/ConfigManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class ConfigManager {
return value
} else if let value = env[ConfigManagerStringConstants.EnvKey] {
return value
} else if let bundleInfoDict = NSBundle.mainBundle().infoDictionary, value = bundleInfoDict["ConfigManagerEnv"] as? String {
} else if let bundleInfoDict = NSBundle.mainBundle().infoDictionary, let value = bundleInfoDict["ConfigManagerEnv"] as? String {
return value
}

Expand Down Expand Up @@ -112,7 +112,7 @@ public class ConfigManager {
static func configFilePaths(defaultPath: String, configEnvironment: String?) -> [NSURL]? {
let defaultUrlPath = NSURL.fileURLWithPath(defaultPath)
var paths = [defaultUrlPath]

guard let filename = defaultUrlPath.lastPathComponent else {
return paths
}
Expand Down Expand Up @@ -177,8 +177,8 @@ public class ConfigManager {

// Check if there is a key to extend another config file. If so, extend recursively.
if let extendedContentsFilename = configurationPayload?[ConfigManagerStringConstants.ConfigurationExtensionKey] as? String,
folderPath = path.URLByDeletingLastPathComponent,
_ = configurationPayload
let folderPath = path.URLByDeletingLastPathComponent,
let _ = configurationPayload
{
var extendedConfigurationPayload = readConfiguration(folderPath.URLByAppendingPathComponent(extendedContentsFilename)!)
extendedConfigurationPayload?.updateWith(configurationPayload!)
Expand Down