-
Notifications
You must be signed in to change notification settings - Fork 612
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
Implement nerdctl compose exec -T
#2507
Conversation
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
composeExecCommand.Flags().Bool("privileged", false, "Give extended privileges to the command") | ||
composeExecCommand.Flags().StringP("user", "u", "", "Username or UID (format: <name|uid>[:<group|gid>])") | ||
composeExecCommand.Flags().Int("index", 1, "index of the container if the service has multiple instances.") | ||
|
||
composeExecCommand.PreRunE = func(cmd *cobra.Command, args []string) error { | ||
flags := cmd.Flags() | ||
if noTTY, _ := flags.GetBool("no-TTY"); noTTY { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if noTTY, _ := flags.GetBool("no-TTY"); noTTY { | |
if noTTY, err := flags.GetBool("no-TTY"); err == nil && noTTY { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem necessary. When err != nil
, noTTY
is unlikely to be true.
could you please add more context in the PR description |
This flag just equates to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This flag just equates to
docker compose exec -T
:Needed by: