File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 34
34
runFlags struct {
35
35
container string
36
36
release string
37
+ noTty bool
37
38
}
38
39
)
39
40
@@ -53,6 +54,12 @@ func init() {
53
54
"" ,
54
55
"Run command inside a toolbox container with the given name." )
55
56
57
+ flags .BoolVarP (& runFlags .noTty ,
58
+ "no-tty" ,
59
+ "T" ,
60
+ false ,
61
+ "Run command without allocating a pseudo-TTY." )
62
+
56
63
flags .StringVarP (& runFlags .release ,
57
64
"release" ,
58
65
"r" ,
@@ -293,11 +300,14 @@ func runCommand(container string,
293
300
294
301
execArgs = append (execArgs , []string {
295
302
"--interactive" ,
296
- "--tty" ,
297
303
"--user" , currentUser .Username ,
298
304
"--workdir" , workingDirectory ,
299
305
}... )
300
306
307
+ if ! runFlags .noTty {
308
+ execArgs = append (execArgs , "--tty" )
309
+ }
310
+
301
311
execArgs = append (execArgs , envOptions ... )
302
312
303
313
execArgs = append (execArgs , []string {
You can’t perform that action at this time.
0 commit comments