File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,8 +31,14 @@ public struct Config: Codable {
3131 }
3232
3333 public init ( at path: String ) throws {
34- guard var url = URL ( string: path) else {
35- throw ConfigError . invalidURL ( path)
34+ var url : URL
35+ if path. hasPrefix ( " file:// " ) {
36+ guard let u = URL ( string: path) else {
37+ throw ConfigError . invalidURL ( path)
38+ }
39+ url = u
40+ } else {
41+ url = URL ( fileURLWithPath: path)
3642 }
3743
3844 if url. lastPathComponent != " puresql.yaml " {
Original file line number Diff line number Diff line change @@ -40,7 +40,13 @@ struct Rewriter {
4040 final . append( contentsOf: source [ start..< stmt. location. upperBound] )
4141 }
4242
43- return final. trimmingCharacters ( in: . whitespaces)
43+ // Looks like the parser can sometimes pickup the ; and sometimes not.
44+ // So make sure to append the ; if it is not there.
45+ var stripped = final. trimmingCharacters ( in: . whitespaces)
46+ if stripped. last != " ; " {
47+ stripped. append ( " ; " )
48+ }
49+ return stripped
4450 }
4551
4652 /// Splits the source into segments where each segment is either
You can’t perform that action at this time.
0 commit comments