(projectDir string)
| 361 | } |
| 362 | |
| 363 | func GetProcessManagerPort(projectDir string) (int, error) { |
| 364 | configFile, err := openGlobalConfigFile() |
| 365 | if err != nil { |
| 366 | return 0, err |
| 367 | } |
| 368 | |
| 369 | config := readGlobalProcessComposeJSON(configFile) |
| 370 | |
| 371 | project, ok := config.Instances[projectDir] |
| 372 | if !ok { |
| 373 | return 0, usererr.WithUserMessage(fmt.Errorf("failed to find projectDir %s in config.Instances", projectDir), "process-compose is not running or it's config is missing. To start it, run `devbox services up`") |
| 374 | } |
| 375 | |
| 376 | return project.Port, nil |
| 377 | } |
| 378 | |
| 379 | func lockFile(file *os.File) error { |
| 380 | lockResult := make(chan error) |
no test coverage detected