Skip to content

Commit fcbe184

Browse files
committed
Replace hardcoded config fallback version with dynamic constant
Previously, when loading the config file, the fallback version `”0.3.0"` was hardcoded to handle unversioned configs from earlier releases. This commit replaces the hardcoded value with the centralized `version` constant, ensuring consistency across the codebase and reducing the risk of version mismatches in the future.
1 parent ab6757f commit fcbe184

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Swiftly/Config.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public struct Config: Codable, Equatable, Sendable {
3232
if config.version == nil {
3333
// Assume that the version of swiftly is 0.3.0 because that is the last
3434
// unversioned release.
35-
config.version = try? SwiftlyVersion(parsing: "0.3.0")
35+
config.version = SwiftlyCore.version
3636
}
3737
return config
3838
} catch {

0 commit comments

Comments
 (0)