mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
fix(upgrader): support Windows executable naming for nginx-ui during core upgrade
This commit is contained in:
parent
5120b63618
commit
6ae85e00a1
1 changed files with 7 additions and 1 deletions
|
@ -242,7 +242,13 @@ func (u *Upgrader) PerformCoreUpgrade(tarPath string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
f, err := os.Open(filepath.Join(tempDir, "nginx-ui"))
|
||||
nginxUIExName := "nginx-ui"
|
||||
|
||||
if u.OS == "windows" {
|
||||
nginxUIExName = "nginx-ui.exe"
|
||||
}
|
||||
|
||||
f, err := os.Open(filepath.Join(tempDir, nginxUIExName))
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "PerformCoreUpgrade open error")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue