Skip to content

Commit

Permalink
fix: upgrade add executable permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
voocel committed Jul 10, 2022
1 parent 0864f56 commit a3c17c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
svDownload string
)

const Ver = "v1.0.2"
const Ver = "v1.1.2"

func main() {
l.SetLevel("debug")
Expand Down
5 changes: 4 additions & 1 deletion upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,8 @@ func (u *Upgrade) upgrade() error {
}

GreenText("upgrade success!")
return os.Rename(filepath.Join(svBin, filename), filepath.Join(svBin, "sv"))
if err = os.Rename(filepath.Join(svBin, filename), filepath.Join(svBin, "sv")); err != nil {
return err
}
return os.Chmod(filepath.Join(svBin, "sv"), 0755)
}

0 comments on commit a3c17c6

Please sign in to comment.