diff --git a/lockfile.go b/lockfile.go index 76bdfbe..d50451b 100644 --- a/lockfile.go +++ b/lockfile.go @@ -139,6 +139,10 @@ func (l Lockfile) TryLock() error { proc, err := l.GetOwner() switch err { default: + if os.IsNotExist(err) { + // tell user that a retry would be a good idea + return ErrNotExist + } // Other errors -> defensively fail and let caller handle this return err case nil: