(ctx context.Context, info postgres.InitInfo)
| 152 | } |
| 153 | |
| 154 | func initSubCommand(ctx context.Context, info postgres.InitInfo) error { |
| 155 | contextLogger := log.FromContext(ctx) |
| 156 | err := info.EnsureTargetDirectoriesDoNotExist(ctx) |
| 157 | if err != nil { |
| 158 | return err |
| 159 | } |
| 160 | |
| 161 | err = info.Bootstrap(ctx) |
| 162 | if err != nil { |
| 163 | contextLogger.Error(err, "Error while bootstrapping data directory") |
| 164 | return err |
| 165 | } |
| 166 | |
| 167 | return nil |
| 168 | } |
no test coverage detected