8000 Add `--no-workers` option · symfony-cli/symfony-cli@fa0a126 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa0a126

Browse files
committed
Add --no-workers option
1 parent 877ffa9 commit fa0a126

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

commands/local_server_start.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ var localServerStartCmd = &console.Command{
8080
// from the console argument.
8181
EnvVars: []string{"SSLKEYLOGFILE"},
8282
},
83+
&console.BoolFlag{Name: "no-workers", Usage: "Do not start workers"},
8384
},
8485
Action: func(c *console.Context) error {
8586
ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin)
@@ -308,7 +309,7 @@ var localServerStartCmd = &console.Command{
308309
go tailer.Tail(terminal.Stderr)
309310
}
310311

311-
if fileConfig != nil {
312+
if fileConfig != nil && !config.NoWorkers {
312313
reexec.NotifyForeground("workers")
313314

314315
_, isDockerComposeWorkerConfigured := fileConfig.Workers[project.DockerComposeWorkerKey]

local/project/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type Config struct {
4747
Daemon bool `yaml:"daemon"`
4848
UseGzip bool `yaml:"use_gzip"`
4949
TlsKeyLogFile string `yaml:"tls_key_log_file"`
50+
NoWorkers bool `yaml:"no_workers"`
5051
}
5152

5253
type FileConfig struct {
@@ -112,6 +113,9 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File
112113
if c.IsSet("tls-key-log-file") {
113114
config.TlsKeyLogFile = c.String("tls-key-log-file")
114115
}
116+
if c.IsSet("no-workers") {
117+
config.NoWorkers = c.Bool("no-workers")
118+
}
115119

116120
return config, fileConfig, nil
117121
}

0 commit comments

Comments
 (0)
0