Conversation
There was a problem hiding this comment.
👍 Looks good to me! Reviewed everything up to a00b53a in 1 minute and 12 seconds
More details
- Looked at
13lines of code in1files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. scripts/package/activitywatch-setup.iss:67
- Draft comment:
Ensure that the deletion of the autostart entry is handled gracefully even if the file does not exist. Consider adding a check or a flag to avoid errors or warnings during the installation process if the file is not found. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_W8fkdYCafGGTgbND
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
⌛ 8 hours left in your free trial, upgrade for $20/seat/month or contact us.
🤖 AI code reviewAdds an [InstallDelete] section to the Inno Setup script that removes the autostart shortcut file at {userstartup}\ActivityWatch before installation, intended to prevent duplicate autostart entries on reinstall/update. The existing commented-out [InstallDelete] block for {app} remains unchanged. Not safe to merge — 1 P1 openConfidence 3/5 1 finding · ❌ 1 P1❌ P1 high — The new [InstallDelete] entry uses Type: files with Name: "{userstartup}{#MyAppName}". In Inno Setup, the {userstartup} constant resolves to the current user's Startup folder, and the shortcut created by the [Icons] section is named "ActivityWatch.lnk" (the .lnk extension is appended automatically). The InstallDelete entry specifies the path without the .lnk extension. Inno Setup's file deletion for a name without an extension will not match the .lnk file, so the autostart shortcut is not removed. As a result, on reinstall/update, the old shortcut remains and a new one is created, producing the duplicate autostart entries the PR aims to prevent. The fix should include the .lnk extension: Name: "{userstartup}{#MyAppName}.lnk". How this was verified: Checked the [Icons] section line 55: Name: "{userstartup}{#MyAppName}"; Filename: "{app}{#MyAppExeName}" — Inno Setup creates a shortcut with the .lnk extension. The InstallDelete entry lacks the .lnk extension, so it will not match the shortcut file. Inno Setup documentation states that InstallDelete Type: files deletes files matching the given name; without a wildcard, it is an exact match. Files changed (1) — the diff as I read it
Reviewed Maintainer commands
|
|
|
||
| ; Removes the previously installed version before installing the new one | ||
| [InstallDelete] | ||
| Type: files; Name: "{userstartup}\{#MyAppName}" |
There was a problem hiding this comment.
❌ P1 — The new [InstallDelete] entry uses Type: files with Name: "{userstartup}{#MyAppName}". In Inno Setup, the {userstartup} constant resolves to the current user's Startup folder, and the shortcut created by the [Icons] section is named "ActivityWatch.lnk" (the .lnk extension is appended automatically). The InstallDelete entry specifies the path without the .lnk extension. Inno Setup's file deletion for a name without an extension will not match the .lnk file, so the autostart shortcut is not removed. As a result, on reinstall/update, the old shortcut remains and a new one is created, producing the duplicate autostart entries the PR aims to prevent. The fix should include the .lnk extension: Name: "{userstartup}{#MyAppName}.lnk".
No idea if this fixes it.
Summary:
This PR updates the
activitywatch-setup.issscript to remove existing autostart entries during installation, preventing duplicates.Key points:
activitywatch-setup.issto remove existing autostart entry during installation.Generated with ❤️ by ellipsis.dev