@@ -25,7 +25,6 @@ import (
25
25
cgo "github.com/compose-spec/compose-go/cli"
26
26
"github.com/compose-spec/compose-go/loader"
27
27
"github.com/compose-spec/compose-go/types"
28
- "github.com/mattn/go-isatty"
29
28
"github.com/mattn/go-shellwords"
30
29
"github.com/spf13/cobra"
31
30
"github.com/spf13/pflag"
@@ -144,7 +143,7 @@ func runCommand(p *projectOptions, backend api.Service) *cobra.Command {
144
143
flags .StringArrayVarP (& opts .environment , "env" , "e" , []string {}, "Set environment variables" )
145
144
flags .StringArrayVarP (& opts .labels , "label" , "l" , []string {}, "Add or override a label" )
146
145
flags .BoolVar (& opts .Remove , "rm" , false , "Automatically remove the container when it exits" )
147
- flags .BoolVarP (& opts .noTty , "no-TTY" , "T" , notAtTTY () , "Disable pseudo-noTty allocation. By default docker compose run allocates a TTY" )
146
+ flags .BoolVarP (& opts .noTty , "no-TTY" , "T" , false , "Disable pseudo-noTty allocation. By default docker compose run allocates a TTY" )
148
147
flags .StringVar (& opts .name , "name" , "" , " Assign a name to the container" )
149
148
flags .StringVarP (& opts .user , "user" , "u" , "" , "Run as specified username or uid" )
150
149
flags .StringVarP (& opts .workdir , "workdir" , "w" , "" , "Working directory inside the container" )
@@ -171,11 +170,6 @@ func normalizeRunFlags(f *pflag.FlagSet, name string) pflag.NormalizedName {
171
170
return pflag .NormalizedName (name )
172
171
}
173
172
174
- func notAtTTY () bool {
175
- b := isatty .IsTerminal (os .Stdout .Fd ()) && isatty .IsTerminal (os .Stdin .Fd ())
176
- return ! b
177
- }
178
-
179
173
func runRun (ctx context.Context , backend api.Service , project * types.Project , opts runOptions ) error {
180
174
err := opts .apply (project )
181
175
if err != nil {
0 commit comments