-
Notifications
You must be signed in to change notification settings - Fork 13
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: Read pod name from podman create args #89
Conversation
Essentially this reads the Is that okay? It still worked fine for me. I tried using the name in the impl as well and that led to the same output. |
This seems relevant: clap-rs/clap#1820 I'm not sure how I'd apply that to this codebase because no one on that thread is using the attribute syntax we're using here. |
Signed-off-by: Ananth Bhaskararaman <[email protected]>
Thanks for working on this! You are getting that error because let pod_name = name_pos.or(name).expect("`name` or `name_pos` is required"); Small nitpicks: I prefer identifiers not to be shortened, so if you could rename |
I think I've managed to fix it now. |
3750115
to
069db99
Compare
Signed-off-by: Ananth Bhaskararaman <[email protected]>
Only set `PodName=` Quadlet option when `--name` is used per the discussion in containers#88. Renamed `name` to `name_flag`. Moved `name_flag` so that it matches the `PodName=` position on podman-systemd.unit(5) man page. Added more user-friendly documentation to `name_flag` help text. Set `long = "name"` and `short` arg attributes for `name_flag`. Refactored `Pod::name()` a bit to use more destructuring and `Option::as_deref()`. Signed-off-by: Paul Nettleton <[email protected]>
Made it so that the |
Sounds good to me. |
Fixes #88