mirror of
https://github.com/docker/compose.git
synced 2026-02-09 01:59:22 +08:00
Fixed broken run --quiet.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
committed by
Guillaume Lours
parent
0878c59a74
commit
d12947e9f8
@@ -142,7 +142,7 @@ func (options runOptions) getEnvironment(resolve func(string) (string, bool)) (t
|
|||||||
return environment, nil
|
return environment, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func runCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command { //nolint:gocyclo
|
func runCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command {
|
||||||
options := runOptions{
|
options := runOptions{
|
||||||
composeOptions: &composeOptions{
|
composeOptions: &composeOptions{
|
||||||
ProjectOptions: p,
|
ProjectOptions: p,
|
||||||
@@ -193,11 +193,7 @@ func runCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *Backen
|
|||||||
|
|
||||||
if options.quiet {
|
if options.quiet {
|
||||||
display.Mode = display.ModeQuiet
|
display.Mode = display.ModeQuiet
|
||||||
devnull, err := os.Open(os.DevNull)
|
backendOptions.Add(compose.WithEventProcessor(display.Quiet()))
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
os.Stdout = devnull
|
|
||||||
}
|
}
|
||||||
createOpts.pullChanged = cmd.Flags().Changed("pull")
|
createOpts.pullChanged = cmd.Flags().Changed("pull")
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user