Skip to content

Commit

Permalink
Handle MS SQL version stings with - in it
Browse files Browse the repository at this point in the history
Handle - in RTM-CU3-GDR in

Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64)
  • Loading branch information
alexbrainman committed Feb 17, 2018
1 parent 27e92ea commit a3e80f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mssql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func serverVersion(db *sql.DB) (sqlVersion, sqlPartNumber, osVersion string, err
for i := range a {
a[i] = strings.Trim(a[i], " \t")
}
l1 := strings.SplitN(a[0], "-", -1)
l1 := strings.SplitN(a[0], "- ", -1)
if len(l1) != 2 {
return "", "", "", errors.New("SQL Server version first line must have - in it: " + v)
}
Expand Down

0 comments on commit a3e80f8

Please sign in to comment.