Check for error on mkdir

pull/1692/head
Darren Shepherd 5 years ago
parent 0efe2af1a7
commit c25f1ab1b6

@ -108,7 +108,9 @@ func Run(ctx context.Context, cfg cmds.Agent) error {
} }
cfg.DataDir = filepath.Join(cfg.DataDir, "agent") cfg.DataDir = filepath.Join(cfg.DataDir, "agent")
os.MkdirAll(cfg.DataDir, 0700) if err := os.MkdirAll(cfg.DataDir, 0700); err != nil {
return err
}
lb, err := loadbalancer.Setup(ctx, cfg) lb, err := loadbalancer.Setup(ctx, cfg)
if err != nil { if err != nil {

Loading…
Cancel
Save