rhysd / go-github-selfupdate

Binary self-update mechanism for Go commands using GitHub
https://godoc.org/github.com/rhysd/go-github-selfupdate/selfupdate
MIT License
597 stars 76 forks source link

Use /tmp instead of current dir #34

Open lululombard opened 4 years ago

lululombard commented 4 years ago

Hi there,

I'm currently writing a system deamon in golang and it's running as /usr/bin/rcsm, the problem is that the auto update tries to create /usr/bin/.rcsm.new /usr/bin/.rcsm.old but /usr/bin is not writable by my deamon, but its own binary is. It would be nice if we could avoid doing modifications in the same directory and use /tmp.

Thanks!