Skip to content

Commit

Permalink
trim 'v' prefix from versions before checking skew (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored Oct 8, 2024
1 parent 83ccd6a commit a93e672
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/embedded-cluster/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var joinCommand = &cli.Command{
}

// check to make sure the version returned by the join token is the same as the one we are running
if jcmd.EmbeddedClusterVersion != versions.Version {
if strings.TrimPrefix(jcmd.EmbeddedClusterVersion, "v") != strings.TrimPrefix(versions.Version, "v") {
return fmt.Errorf("embedded cluster version mismatch - this binary is version %q, but the cluster is running version %q", versions.Version, jcmd.EmbeddedClusterVersion)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/embedded-cluster/preflights.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ var joinRunPreflightsCommand = &cli.Command{
}

// check to make sure the version returned by the join token is the same as the one we are running
if jcmd.EmbeddedClusterVersion != versions.Version {
if strings.TrimPrefix(jcmd.EmbeddedClusterVersion, "v") != strings.TrimPrefix(versions.Version, "v") {
return fmt.Errorf("embedded cluster version mismatch - this binary is version %q, but the cluster is running version %q", versions.Version, jcmd.EmbeddedClusterVersion)
}

Expand Down

0 comments on commit a93e672

Please sign in to comment.