[issue-477] Allow unprefixed go versions#497
Open
CelianR wants to merge 1 commit intomoovweb:masterfrom
Open
Conversation
stackbaek
reviewed
Jan 23, 2025
| if [[ "${_line}" = go* ]]; then | ||
| version="${_line}" | ||
| else | ||
| # if the version is not prefixed with "go" add it |
There was a problem hiding this comment.
just an icing on the cake - should we print the fact that we've added prefix?
|
Any updates on this PR? |
cndoit18
reviewed
Mar 20, 2025
Comment on lines
+192
to
+197
| if [[ "${_line}" = go* ]]; then | ||
| version="${_line}" | ||
| else | ||
| # if the version is not prefixed with "go" add it | ||
| version="go${_line}" | ||
| fi |
There was a problem hiding this comment.
Suggested change
| if [[ "${_line}" = go* ]]; then | |
| version="${_line}" | |
| else | |
| # if the version is not prefixed with "go" add it | |
| version="go${_line}" | |
| fi | |
| version="go${_line#go}" |
cndoit18
reviewed
Mar 20, 2025
| # skip comment lines | ||
| [[ "${_line}" =~ \#.* ]] && continue | ||
|
|
||
| # looking for pattern "go1.2[.3]" |
There was a problem hiding this comment.
Suggested change
| # looking for pattern "go1.2[.3]" | |
| # looking for pattern "[go]1.2[.3]" |
|
This repository hasn't been updated for a long time. I have maintained a forked version myself gvm. You can try this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #477.
This allows
.go-versionfiles to not have thegoprefix. Now it is possible to have a.go-versionfile containing1.22.8.Discussion: