Skip to content

Commit

Permalink
fix err variable assignment + gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofaresin committed Dec 1, 2023
1 parent 70f1a83 commit fe5a8e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/nfs-subdir-external-provisioner/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ func (p *nfsProvisioner) Provision(ctx context.Context, options controller.Provi
return nil, controller.ProvisioningFinished, errors.New("unable to create directory to provision new pv: " + err.Error())
}
err := os.Chmod(fullPath, createMode)
if err != nil {
if err != nil {
return nil, "", err
}
err := os.Chown(fullPath, uid, gid)
if err != nil {
err = os.Chown(fullPath, uid, gid)
if err != nil {
return nil, "", err
}

pv := &v1.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{
Name: options.PVName,
Expand Down

0 comments on commit fe5a8e9

Please sign in to comment.