Skip to content

fix: conflict in parsing of -h flag for help and hostname in container run - #1251

Merged
Shubhranshu153 merged 1 commit into
runfinch:mainfrom
Shubhranshu153:fix-hostname
Jan 23, 2025
Merged

Shubhranshu153 merged 1 commit into
runfinch:mainfrom
Shubhranshu153:fix-hostname

Conversation

@Shubhranshu153

@Shubhranshu153 Shubhranshu153 commented Jan 21, 2025

Copy link
Copy Markdown
Member

…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.

Comment thread cmd/finch/nerdctl_remote.go Outdated

@austinvazquez austinvazquez left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread cmd/finch/nerdctl.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl_remote.go Outdated
Comment thread cmd/finch/nerdctl.go Outdated
…r run

Signed-off-by: Shubharanshu Mahapatra <shubhum@amazon.com>
@Shubhranshu153
Shubhranshu153 merged commit 8b8df27 into runfinch:main Jan 23, 2025
@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