Merge pull request #1692 from ibuildthecloud/err

Check for error on mkdir
This commit is contained in:
Erik Wilson 2020-05-04 20:16:20 -07:00 committed by GitHub
commit 21266bab7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,9 @@ func Run(ctx context.Context, cfg cmds.Agent) error {
}
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)
if err != nil {