Skip to content

Commit

Permalink
✨Trim v prefix from version.
Browse files Browse the repository at this point in the history
  • Loading branch information
preslavgerchev committed Sep 25, 2023
1 parent 56f45fd commit 7aff459
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ func EnsureProvider(existing Providers, connectorName string, connectorType stri
}

func Install(name string, version string) (*Provider, error) {
if version == "" {
if version != "" {
// we remove the v prefix if passing in a version that looks like 'v9.0.0'
version = strings.TrimPrefix(version, "v")
} else {
// else, if no version is specified, we default to installing the latest one
latestVersion, err := LatestVersion(name)
if err != nil {
return nil, err
Expand Down

0 comments on commit 7aff459

Please sign in to comment.