Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix ubuntu version get #1911

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Conversation

wongearl
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

fix: fix ubuntu version get

Which issue(s) this PR fixes:

Fixes #1910

Special notes for reviewers:

Does this PR introduced a user-facing change?

None

Additional documentation, usage docs, etc.:


@ks-ci-bot ks-ci-bot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 12, 2023
@wongearl
Copy link
Contributor Author

wongearl commented Jul 12, 2023

/assign @LinuxSuRen

@@ -95,7 +95,9 @@ func CreateManifest(arg common.Argument, name string) error {
case "ubuntu":
id = "ubuntu"
v := strings.Split(osImageArr[1], ".")
version = fmt.Sprintf("%s.%s", v[0], v[1])
if len(v) == 2 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer using len(v) >= 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reasonable

Copy link
Member

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2023
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 5c59dc466c2928013ac6d09498c83d18e151d8a3

@ImitationImmortal
Copy link
Collaborator

@all-contributors please add @wongearl for code

@allcontributors
Copy link
Contributor

@littleBlackHouse

I've put up a pull request to add @wongearl! 🎉

@ImitationImmortal
Copy link
Collaborator

/approve

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LinuxSuRen, littleBlackHouse, wongearl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2023
@ks-ci-bot ks-ci-bot merged commit ed24dcf into kubesphere:master Jul 13, 2023
4 checks passed
@wongearl wongearl deleted the fix/ubuntu branch July 13, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kk create manifest panic: runtime error: index out of range [1] with length 1
4 participants