mirror of
https://github.com/taigrr/go-selfupdate
synced 2025-01-18 04:33:12 -08:00
Merge pull request #23 from sushilkm/master
Return error if failed to make directory while "BackgroundRun"
This commit is contained in:
commit
b38c8adacf
@ -98,7 +98,10 @@ func (u *Updater) getExecRelativeDir(dir string) string {
|
||||
|
||||
// BackgroundRun starts the update check and apply cycle.
|
||||
func (u *Updater) BackgroundRun() error {
|
||||
os.MkdirAll(u.getExecRelativeDir(u.Dir), 0777)
|
||||
if err := os.MkdirAll(u.getExecRelativeDir(u.Dir), 0777); err != nil {
|
||||
// fail
|
||||
return err
|
||||
}
|
||||
if u.wantUpdate() {
|
||||
if err := up.CanUpdate(); err != nil {
|
||||
// fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user