Skip to content

Commit

Permalink
Merge pull request #847 from giuseppe/allow-reset-mount-program
Browse files Browse the repository at this point in the history
overlay: allow to reset mount_program
  • Loading branch information
rhatdan authored Mar 8, 2021
2 parents b3de91e + dde567a commit 5be7b92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,11 @@ func parseOptions(options []string) (*overlayOptions, error) {
}
case "mount_program":
logrus.Debugf("overlay: mount_program=%s", val)
_, err := os.Stat(val)
if err != nil {
return nil, fmt.Errorf("overlay: can't stat program %s: %v", val, err)
if val != "" {
_, err := os.Stat(val)
if err != nil {
return nil, errors.Wrapf(err, "overlay: can't stat program %q", val)
}
}
o.mountProgram = val
case "skip_mount_home":
Expand Down

0 comments on commit 5be7b92

Please sign in to comment.