Browse Source

Fix help output for "exec --no-tty" option

Signed-off-by: Anton Ovchinnikov <[email protected]>
(cherry picked from commit 8619f5d72a2dc6d0418369c737c8257725cf0604)
Signed-off-by: Guillaume Lours <[email protected]>
Anton Ovchinnikov 2 months ago
parent
commit
5e209ea113
3 changed files with 3 additions and 3 deletions
  1. 1 1
      cmd/compose/exec.go
  2. 1 1
      docs/reference/compose_exec.md
  3. 1 1
      docs/reference/docker_compose_exec.yaml

+ 1 - 1
cmd/compose/exec.go

@@ -82,7 +82,7 @@ func execCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Compose)
 	runCmd.Flags().IntVar(&opts.index, "index", 0, "Index of the container if service has multiple replicas")
 	runCmd.Flags().BoolVarP(&opts.privileged, "privileged", "", false, "Give extended privileges to the process")
 	runCmd.Flags().StringVarP(&opts.user, "user", "u", "", "Run the command as this user")
-	runCmd.Flags().BoolVarP(&opts.noTty, "no-tty", "T", !dockerCli.Out().IsTerminal(), "Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.")
+	runCmd.Flags().BoolVarP(&opts.noTty, "no-tty", "T", !dockerCli.Out().IsTerminal(), "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().BoolVarP(&opts.interactive, "interactive", "i", true, "Keep STDIN open even if not attached")

+ 1 - 1
docs/reference/compose_exec.md

@@ -20,7 +20,7 @@ a script.
 | `--dry-run`       | `bool`        |         | Execute command in dry run mode                                                  |
 | `-e`, `--env`     | `stringArray` |         | Set environment variables                                                        |
 | `--index`         | `int`         | `0`     | Index of the container if service has multiple replicas                          |
-| `-T`, `--no-tty`  | `bool`        | `true`  | Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY. |
+| `-T`, `--no-tty`  | `bool`        | `true`  | Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY. |
 | `--privileged`    | `bool`        |         | Give extended privileges to the process                                          |
 | `-u`, `--user`    | `string`      |         | Run the command as this user                                                     |
 | `-w`, `--workdir` | `string`      |         | Path to workdir directory for this command                                       |

+ 1 - 1
docs/reference/docker_compose_exec.yaml

@@ -63,7 +63,7 @@ options:
       value_type: bool
       default_value: "true"
       description: |
-        Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.
+        Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY.
       deprecated: false
       hidden: false
       experimental: false