-
-
Notifications
You must be signed in to change notification settings - Fork 150
Fix temp binary not starting correclty #583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if the binary ends with -temp gets restarted all over
Systray.Restart() | ||
Systray.Update(newPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restart()
does not pass the path of the binary to start
Update()
sets this path and then calls Restart()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2386dae
to
cbd9df5
Compare
panic(err) | ||
} | ||
|
||
Systray.Restart() | ||
Systray.Update(newPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea!
fmt.Printf("Error getting exe path using osext lib. err: %v\n", err) | ||
log.Printf("Error getting exe path using osext lib. err: %v\n", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kill 'em all!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* fix strange temp binary file behavior: if the binary ends with -temp gets restarted all over * add some useful logs * Systray.Start() was called even if the program have to restart * added useful prints * replace fmt with a proper logger
Please check if the PR fulfills these requirements
before creating one)
bug fix
Fixes a regression introduced in #551 (https://github.com/arduino/arduino-create-agent/pull/551/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R139)
When the binary file ending with
-temp
is manually started it does not start the correct bin file but it keeps starting itself.Fixed. Now when the temp binary is started it correctly copy itself to the full binary (binary file not ending with
-temp
) and starts itno