jaemk / self_update

Self updates for rust executables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update fails when current_exe's directory is not writable (even if current_exe is writable)

alpire opened this issue · comments

We're running into an issue where self update fails trying to write the tmp file in the std::env::current_exes directory. In our particular case, the std::env::current_exes directory is not writable, hence the failure. However, std::env::current_exe is writable, so it could in theory be updated.

It'd be nice if self_update could handle this case, perhaps by using /tmp if /tmp happens to be in the same filesystem as the binary being updated.

Related to #2