mirror of https://github.com/docker/compose.git
Add -i and -t to run and exec
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
c12a948f97
commit
61735c0012
|
@ -73,6 +73,11 @@ func execCommand(p *projectOptions, backend api.Service) *cobra.Command {
|
||||||
runCmd.Flags().BoolVarP(&opts.noTty, "no-TTY", "T", false, "Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.")
|
runCmd.Flags().BoolVarP(&opts.noTty, "no-TTY", "T", false, "Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.")
|
||||||
runCmd.Flags().StringVarP(&opts.workingDir, "workdir", "w", "", "Path to workdir directory for this command.")
|
runCmd.Flags().StringVarP(&opts.workingDir, "workdir", "w", "", "Path to workdir directory for this command.")
|
||||||
|
|
||||||
|
runCmd.Flags().BoolP("interactive", "i", true, "Keep STDIN open even if not attached. DEPRECATED")
|
||||||
|
runCmd.Flags().MarkHidden("interactive") //nolint:errcheck
|
||||||
|
runCmd.Flags().BoolP("tty", "t", true, "Allocate a pseudo-TTY. DEPRECATED")
|
||||||
|
runCmd.Flags().MarkHidden("tty") //nolint:errcheck
|
||||||
|
|
||||||
runCmd.Flags().SetInterspersed(false)
|
runCmd.Flags().SetInterspersed(false)
|
||||||
return runCmd
|
return runCmd
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,6 +155,11 @@ func runCommand(p *projectOptions, backend api.Service) *cobra.Command {
|
||||||
flags.BoolVar(&opts.servicePorts, "service-ports", false, "Run command with the service's ports enabled and mapped to the host.")
|
flags.BoolVar(&opts.servicePorts, "service-ports", false, "Run command with the service's ports enabled and mapped to the host.")
|
||||||
flags.BoolVar(&opts.quietPull, "quiet-pull", false, "Pull without printing progress information.")
|
flags.BoolVar(&opts.quietPull, "quiet-pull", false, "Pull without printing progress information.")
|
||||||
|
|
||||||
|
cmd.Flags().BoolP("interactive", "i", true, "Keep STDIN open even if not attached. DEPRECATED")
|
||||||
|
cmd.Flags().MarkHidden("interactive") //nolint:errcheck
|
||||||
|
cmd.Flags().BoolP("tty", "t", true, "Allocate a pseudo-TTY. DEPRECATED")
|
||||||
|
cmd.Flags().MarkHidden("tty") //nolint:errcheck
|
||||||
|
|
||||||
flags.SetNormalizeFunc(normalizeRunFlags)
|
flags.SetNormalizeFunc(normalizeRunFlags)
|
||||||
flags.SetInterspersed(false)
|
flags.SetInterspersed(false)
|
||||||
return cmd
|
return cmd
|
||||||
|
|
Loading…
Reference in New Issue