jandamm/zgenom

autoupdate complains about lock file

alextes opened this issue · 2 comments

❯ zgenom autoupdate
Alias tip: zgen autoupdate
__zgenom_autoupdate:33: file exists: /Users/alextes/.zgenom-autoupdate-lock
❯ stat /Users/alextes/.zgenom-autoupdate-lock
gstat: cannot stat '/Users/alextes/.zgenom-autoupdate-lock': No such file or directory

any idea what could cause this? Only odd thing I can think of is that my .zshrc is a symlink.

It's expected that you cannot find the lockfile after zgenom autoupdate ran since it removes the lockfile.

In theory a lockfile is created, locked, - updates happen - written to it (releases the lock) and then removed.
Somehow the lock is acquired by the shell but then the shell cannot write to the lockfile.

I need to try to reproduce this issue.

Could you please check which $ZSH_VERSION you're running?

It's actually setopt noclobber which prevents redirection (>) when the target file exists.

I've overridden this option now.
I was able to reproduce it and it worked afterwards.