Fixes some bad error returns in the persist service and check paths.

This commit is contained in:
James Phillips 2016-04-26 15:03:26 -07:00
parent 61a1be6c95
commit 0f7f07d2f5
1 changed files with 2 additions and 2 deletions

View File

@ -669,7 +669,7 @@ func (a *Agent) persistService(service *structs.NodeService) error {
}
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil
return err
}
if err := os.MkdirAll(filepath.Dir(svcPath), 0700); err != nil {
return err
@ -707,7 +707,7 @@ func (a *Agent) persistCheck(check *structs.HealthCheck, chkType *CheckType) err
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil
return err
}
if err := os.MkdirAll(filepath.Dir(checkPath), 0700); err != nil {
return err