diff --git a/lockfile.go b/lockfile.go index ce1244f..698e028 100644 --- a/lockfile.go +++ b/lockfile.go @@ -138,6 +138,10 @@ func (l Lockfile) TryLock() error { _, 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: