()
| 86 | } |
| 87 | |
| 88 | func openGlobalConfigFile() (*os.File, error) { |
| 89 | configPath, err := globalProcessComposeJSONPath() |
| 90 | if err != nil { |
| 91 | return nil, fmt.Errorf("failed to get config path: %w", err) |
| 92 | } |
| 93 | |
| 94 | globalConfigFile, err := os.OpenFile(configPath, os.O_WRONLY|os.O_CREATE, 0o664) |
| 95 | if err != nil { |
| 96 | return nil, fmt.Errorf("failed to open config file: %w", err) |
| 97 | } |
| 98 | |
| 99 | err = lockFile(globalConfigFile) |
| 100 | if err != nil { |
| 101 | return nil, fmt.Errorf("failed to lock file: %w", err) |
| 102 | } |
| 103 | |
| 104 | return globalConfigFile, nil |
| 105 | } |
| 106 | |
| 107 | func StartProcessManager( |
| 108 | w io.Writer, |
no test coverage detected