Windows FMA - DeepL#46507
Conversation
Script Diff Resultsee/maintained-apps/outputs/deepl/windows.json=== Install Script (no changes) ===
=== Uninstall // b098661f -> befae007 ===
--- /tmp/old.2N8rct 2026-05-30 00:44:22.921728021 +0000
+++ /tmp/new.OCcg6C 2026-05-30 00:44:22.921728021 +0000
@@ -1,3 +1,7 @@
+# Locates DeepL's uninstaller from the registry and runs it silently.
+# DeepL installs via Zero Install (0install). Its QuietUninstallString is a
+# 0install command, e.g.:
+
$displayNameLike = "DeepL*"
$publisher = "DeepL SE"
@@ -23,11 +27,11 @@
Stop-Process -Name "DeepL" -Force -ErrorAction SilentlyContinue
-$uninstallCommand = if ($uninstall.QuietUninstallString) {
- $uninstall.QuietUninstallString
-} else {
- $uninstall.UninstallString
-}
+# Prefer QuietUninstallString -- it already carries 0install's silent flags
+# (--batch --background). Fall back to UninstallString and add those flags
+# (NOT --verysilent) to keep it non-interactive.
+$useQuiet = [bool]$uninstall.QuietUninstallString
+$uninstallCommand = if ($useQuiet) { $uninstall.QuietUninstallString } else { $uninstall.UninstallString }
$exePath = ""
$existingArgs = ""
@@ -37,34 +41,4 @@
} elseif ($uninstallCommand -match '(?i)^\s*(.+?\.exe)\s*(.*)$') {
$exePath = $matches[1]
$existingArgs = $matches[2].Trim()
-} elseif ($uninstallCommand -match '^\s*(\S+)\s*(.*)$') {
- $exePath = $matches[1]
- $existingArgs = $matches[2].Trim()
-} else {
- Throw "Could not parse uninstall string: $uninstallCommand"
-}
-
-if ($existingArgs -notmatch '(?i)--verysilent') {
- $existingArgs = ("$existingArgs --verysilent").Trim()
-}
-
-Write-Host "Uninstall command: $exePath"
-Write-Host "Uninstall args: $existingArgs"
-
-try {
- $processOptions = @{
- FilePath = $exePath
- ArgumentList = $existingArgs
- NoNewWindow = $true
- PassThru = $true
- Wait = $true
- }
-
- $process = Start-Process @processOptions
- $exitCode = $process.ExitCode
- Write-Host "Uninstall exit code: $exitCode"
- Exit $exitCode
-} catch {
- Write-Host "Error running uninstaller: $_"
- Exit 1
-}
+} elseif ($uninstallC |
Script Diff Resultsee/maintained-apps/outputs/deepl/windows.json=== Install Script (no changes) ===
=== Uninstall // befae007 -> 3de00047 ===
--- /tmp/old.uqEbz9 2026-05-30 00:54:14.810442229 +0000
+++ /tmp/new.BD15Ko 2026-05-30 00:54:14.810442229 +0000
@@ -1,44 +1,74 @@
-# Locates DeepL's uninstaller from the registry and runs it silently.
-# DeepL installs via Zero Install (0install). Its QuietUninstallString is a
-# 0install command, e.g.:
-
-$displayNameLike = "DeepL*"
-$publisher = "DeepL SE"
-
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
+$ErrorActionPreference = "Stop"
+$ProgressPreference = "SilentlyContinue"
+
+$uninstallKeys = @(
+ "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
+ "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*",
+ "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
+ "HKCU:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
)
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $_.DisplayName -like $displayNameLike -and $_.Publisher -like "$publisher*"
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or (-not $uninstall.UninstallString -and -not $uninstall.QuietUninstallString)) {
- Write-Host "Uninstall entry not found"
- Exit 0
-}
-
-Stop-Process -Name "DeepL" -Force -ErrorAction SilentlyContinue
-
-# Prefer QuietUninstallString -- it already carries 0install's silent flags
-# (--batch --background). Fall back to UninstallString and add those flags
-# (NOT --verysilent) to keep it non-interactive.
-$useQuiet = [bool]$uninstall.QuietUninstallString
-$uninstallCommand = if ($useQuiet) { $uninstall.QuietUninstallString } else { $uninstall.UninstallString }
-
-$exePath = ""
-$existingArgs = ""
-if ($uninstallCommand -match '^\s*"([^"]+)"\s*(.*)$') {
- $exePath = $matches[1]
- $existingArgs = $matches[2].Trim()
-} elseif ($uninstallCommand -match '(?i)^\s*(.+?\.exe)\s*(.*)$') {
- $exePath = $matches[1]
- $existingArgs = $matches[2].Trim()
-} elseif ($uninstallC
+$app = Get-ItemProperty $uninstallKeys -ErrorAction SilentlyContinue |
+ Where-Object { $_.DisplayName -like "DeepL*" } |
+ Select-Object -First 1
+
+if (-not $app) {
+ Write-Host "DeepL not found in registry; nothing to uninstall."
+ exit 0
+}
+
+# Prefer QuietUninstallString verbatim — 0install already includes --batch --background there.
+$useQuiet = $false
+$cmd = $null
+$arguments = ""
+
+if ($app.QuietUninstallString) {
+ $uninstallString = $app.QuietUninstallString
+ $useQuiet = $true
+} else {
+ $uninstallString = $app.UninstallString
+}
+
+if (-not $uninstallString) {
+ Write-Host "No uninstall string found for DeepL."
+ exit 1
+}
+
+# Parse the uninstall string into executable + arguments.
+if ($uninstallString -match '^"([^"]+)"\s*(.*)$') {
+ # Quoted executable path.
+ $cmd = $matches[1]
+ $arguments = $matches[2].Trim()
+} elseif ($uninstallString -match '^(\S+\.exe)\s*(.*)$') {
+ # Unquoted single-token executable.
+ $cmd = $matches[1]
+ $arguments = $matches[2].Trim()
+} else {
+ # Bare path with no arguments.
+ $cmd = $uninstallString.Trim()
+ $arguments = ""
+}
+
+# Only append 0install silent flags when we fell back to the plain UninstallString.
+if (-not $useQuiet) {
+ if ($arguments -notmatch '--batch') { $arguments = ("$arguments --batch").Trim() }
+ if ($arguments -notmatch '--background') { $arguments = ("$arguments --background").Trim() }
+}
+
+Write-Host "Uninstalling DeepL: $cmd $arguments"
+
+if ($arguments) {
+ $proc = Start-Process -FilePath $cmd -ArgumentList $arguments -Wait -PassThru -NoNewWindow
+} else {
+ $proc = Start-Process -FilePath $cmd -Wait -PassThru -NoNewWindow
+}
+
+$exitCode = $proc.ExitCode
+Write-Host "Uninstaller exited with code $exitCode"
+
+# 0install / common success codes.
+if ($exitCode -eq 0 -or $exitCode -eq 3010 -or $exitCode -eq 1605) {
+ exit 0
+}
+
+exit $exitCode |
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThis PR adds complete Windows support for DeepL to Fleet's maintained apps system. It introduces a Winget input manifest defining DeepL's installer characteristics, two PowerShell scripts for automated installation and uninstallation with registry-based detection and exit code normalization, output definitions registering DeepL as a Windows app with version 26.4.1 metadata, and a validation logic adjustment to handle DeepL's detection when version information is unavailable. Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #46507 +/- ##
=======================================
Coverage 66.81% 66.81%
=======================================
Files 2805 2805
Lines 223576 223576
Branches 11481 11481
=======================================
+ Hits 149380 149387 +7
+ Misses 60640 60635 -5
+ Partials 13556 13554 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Moving this one to draft to think through it some more. If it doesn't register a version string (which I confirmed it doesn't via |
|
Let's just close this one and skip - I thought maybe it registered it in the reg key but no. Odd little app. |
Summary by CodeRabbit
Release Notes