Skip to content

Commit

Permalink
Strip 1: from DB version on Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 9, 2024
1 parent 55e40ab commit c3adf80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions envs/envs.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ func extractRelationshipsEnvs(env Environment) Envs {
// Docker support
if v, ok := endpoint["version"]; ok {
values[versionKey] = v.(string)
if strings.HasPrefix(values[versionKey], "1:") {
values[versionKey] = values[versionKey][2:]
}
}
}
if v, ok := values[versionKey]; ok && v != "" {
Expand Down
2 changes: 1 addition & 1 deletion envs/envs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (s *ScenvSuite) TestDockerDatabaseURLs(c *C) {
"rel": "mysql",
"scheme": "mysql",
"username": "root",
"version": "10.0.38+maria-1~xenial",
"version": "1:10.0.38+maria-1~xenial",
},
},
"postgresql": {
Expand Down

0 comments on commit c3adf80

Please sign in to comment.