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 #4072 : minor_version of kubectl calculated by stripping '+' correctly #4073

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

ashutosrath
Copy link
Contributor

@ashutosrath ashutosrath commented Jun 5, 2024

Pull Request Template

Description

below calculation of minor_version of kubectl corrected. This will work for both macosx bash and other linux bash shells

minor_version=${minor_version::-1}

above code is changed to

minor_version=${minor_version::$((${#minor_version} - 1))}

Fixes: #4072

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checked by running the agent_install.sh script in macosx bash shell

Additional Context (Please include any Screenshots/gifs if relevant)

...

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have tagged the reviewers in a comment below incase my pull request is ready for a review
  • I have signed the commit message to agree to Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command.

@dlarson04 dlarson04 self-requested a review June 5, 2024 18:39
fixed minor_version calculation of kubectl 

Fixes: open-horizon#4072

Signed-off-by: ASHUTOS RATH <ashutos.rath@gmail.com>
@LiilyZhang LiilyZhang merged commit b10d2cd into open-horizon:master Jul 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: ./agent-install.sh: line 1562: -1: substring expression < 0
4 participants