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: conflict in parsing of -h flag for help and hostname in container run #1251

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

Shubhranshu153
Copy link
Contributor

@Shubhranshu153 Shubhranshu153 commented Jan 21, 2025

…r run

Issue #, if available:

Description of changes:

  1. Fix conflict in parsing of -h flag for help and hostname in container
  2. Fix invalid ptr access error at different places of the parsing logic

Testing done:

  1. Run with -h flag and check --help works
  2. finch run -it --name edge -h edge alpine sh
  3. finch compose -h
  4. finch compose run --help
  • I've reviewed the guidance in CONTRIBUTING.md

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Member

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

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

So this [nerdctlCommand.run] must be the infamous parsing function that CLI folks refer to that is long overdue for refactor. I don't have any recommendations today so no reason to block this but it does feel odd to me and difficult to maintain.

cmd/finch/nerdctl.go Outdated Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Outdated Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl_remote.go Show resolved Hide resolved
cmd/finch/nerdctl.go Outdated Show resolved Hide resolved
@Shubhranshu153 Shubhranshu153 merged commit 8b8df27 into runfinch:main Jan 23, 2025
28 checks passed
@Shubhranshu153 Shubhranshu153 deleted the fix-hostname branch January 23, 2025 20:21
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.

4 participants