mirror of
https://github.com/docker/compose.git
synced 2025-12-16 18:24:00 +01:00
chore: fix grammatical errors and improve clarity in code
Signed-off-by: xiaolinny <xiaolincode@outlook.com>
This commit is contained in:
parent
c0345e4f45
commit
0878c59a74
@ -185,7 +185,7 @@ func runCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *Backen
|
|||||||
}
|
}
|
||||||
} else if !cmd.Flags().Changed("no-TTY") && !cmd.Flags().Changed("interactive") && !dockerCli.In().IsTerminal() {
|
} else if !cmd.Flags().Changed("no-TTY") && !cmd.Flags().Changed("interactive") && !dockerCli.In().IsTerminal() {
|
||||||
// while `docker run` requires explicit `-it` flags, Compose enables interactive mode and TTY by default
|
// while `docker run` requires explicit `-it` flags, Compose enables interactive mode and TTY by default
|
||||||
// but when compose is used from a scripr has stdin piped from another command, we just can't
|
// but when compose is used from a script that has stdin piped from another command, we just can't
|
||||||
// Here, we detect we run "by default" (user didn't passed explicit flags) and disable TTY allocation if
|
// Here, we detect we run "by default" (user didn't passed explicit flags) and disable TTY allocation if
|
||||||
// we don't have an actual terminal to attach to for interactive mode
|
// we don't have an actual terminal to attach to for interactive mode
|
||||||
options.noTty = true
|
options.noTty = true
|
||||||
|
|||||||
@ -38,7 +38,7 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types.
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove cancellable context signal handler so we can forward signals to container without compose to exit
|
// remove cancellable context signal handler so we can forward signals to container without compose from exiting
|
||||||
signal.Reset()
|
signal.Reset()
|
||||||
|
|
||||||
sigc := make(chan os.Signal, 128)
|
sigc := make(chan os.Signal, 128)
|
||||||
|
|||||||
@ -313,7 +313,7 @@ func (d *DryRunClient) ContainerExecStart(ctx context.Context, execID string, co
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Functions delegated to original APIClient (not used by Compose or not modifying the Compose stack
|
// Functions delegated to original APIClient (not used by Compose or not modifying the Compose stack)
|
||||||
|
|
||||||
func (d *DryRunClient) ConfigList(ctx context.Context, options swarm.ConfigListOptions) ([]swarm.Config, error) {
|
func (d *DryRunClient) ConfigList(ctx context.Context, options swarm.ConfigListOptions) ([]swarm.Config, error) {
|
||||||
return d.apiClient.ConfigList(ctx, options)
|
return d.apiClient.ConfigList(ctx, options)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user