We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b78c5c commit e82db34Copy full SHA for e82db34
main.go
@@ -444,9 +444,14 @@ func loop() {
444
}()
445
}
446
447
-// oldInstallExixts will return true if an old installation of the agent exixts (on macos)
+// oldInstallExists will return true if an old installation of the agent exists (on macos) and is not the process running
448
func oldInstallExists() bool {
449
oldAgentPath := config.GetDefaultHomeDir().Join("Applications", "ArduinoCreateAgent")
450
+ currentBinary, _ := os.Executable()
451
+ // if the current running binary is the old one we don't need to do anything
452
+ if paths.New(currentBinary).IsInsideDir(oldAgentPath) {
453
+ return false
454
+ }
455
return oldAgentPath.Exist()
456
457
0 commit comments