Skip to content

Commit

Permalink
[Golang] [Package] [Updater] Fix Assets Name
Browse files Browse the repository at this point in the history
- [+] fix(app.go): update asset name format to match the current project name
- [+] fix(app.go): update command to restart the application with the correct executable name
  • Loading branch information
H0llyW00dzZ committed Dec 11, 2023
1 parent 650e6e3 commit 416df21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions updater/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func downloadAndUpdate(release *releaseInfo) (string, error) {
// findMatchingAsset finds and returns the URL of the asset that matches the current platform.
func findMatchingAsset(release *releaseInfo) (string, error) {
for _, asset := range release.Assets {
if asset.Name == fmt.Sprintf("myapp-%s-%s", runtime.GOOS, runtime.GOARCH) {
if asset.Name == fmt.Sprintf("ChatGPT-Next-Web-Session-Exporter-%s-%s", runtime.GOOS, runtime.GOARCH) {
return asset.BrowserDownloadURL, nil
}
}
Expand Down Expand Up @@ -196,7 +196,7 @@ func applyUpdate(tempFileName string) error {
// restartApplication restarts the application.
func restartApplication() {
fmt.Println("Update applied. Restarting application...")
cmd := exec.Command("myapp")
cmd := exec.Command("ChatGPT-Next-Web-Session-Exporter")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Start(); err != nil {
Expand Down

0 comments on commit 416df21

Please sign in to comment.