Jarred-Sumner / git-peek

git repo to local editor instantly
MIT License
722 stars 17 forks source link

Folder deleted before editor is closed #13

Closed solarkraft closed 3 years ago

solarkraft commented 3 years ago

Nice project! Just one (for me fatal) issue:

On Windows, with JetBrains Rider (C:\Users\<user>\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\203.6682.21\bin\rider64.exe) set as $env:EDITOR, the repo is deleted while it is being loaded.

I assume this is because Rider forks itself away causing git-peek to think that it has been closed.

It also leads to some Error: EPERM: operation not permitted, unlink (...) issues, likely due to Windows' file locking while they are open in Rider.

A simple fix/workaround for this might be something like a --no-delete or --no-close option.

Jarred-Sumner commented 3 years ago

Yeah this is kind of an unsafe default right now. This issue will happen with any editor that isn’t one of the ones I manually got working.

Maybe the best behavior is:

This way, it’s still temporary but doesn’t just immediately try to delete when it can’t do the equivalent of —wait

Jarred-Sumner commented 3 years ago

Fixed in 1.1.32: image