fix(uninstall): reconcile extension-only installs
This commit is contained in:
1 parent
d83ad0ec12
commit
7186bd06ca
3 files changed
+3
-3
No files matched your search
@@ -18,7 +18,7 @@ $generated = Join-Path $root 'generated'
|
||||
$targets = @(Get-InstallTargets -Generated $generated -HomePath $homePath -Shell 'bash' -Client $Client)
|
||||
$installedTargets = @($targets | Where-Object { Test-Path -LiteralPath (Get-ManagedManifestPath $_.Destination) })
|
||||
|
||||
if (-not $DryRun -and $installedTargets.Count -eq 0) { throw 'Not installed, nothing to uninstall.' }
|
||||
if (-not $DryRun -and $installedTargets.Count -eq 0 -and -not (Test-Path -LiteralPath (Join-Path $homePath '.my-ai-configuration/extensions.json'))) { throw 'Not installed, nothing to uninstall.' }
|
||||
|
||||
if (-not $DryRun -and -not $Force) {
|
||||
if ([Console]::IsInputRedirected -or $env:CI -eq 'true' -or $env:AI_CONFIG_NO_INTERACTIVE -eq '1') {
|
||||
|
||||
@@ -30,7 +30,7 @@ installed_count=0
|
||||
for target_pair in "${targets[@]}"; do
|
||||
[ -f "$(manifest_path "${target_pair#*|}")" ] && installed_count=$((installed_count + 1))
|
||||
done
|
||||
if [ "$dry_run" = false ] && [ "$installed_count" -eq 0 ]; then
|
||||
if [ "$dry_run" = false ] && [ "$installed_count" -eq 0 ] && [ ! -f "$home_path/.my-ai-configuration/extensions.json" ]; then
|
||||
printf 'Not installed, nothing to uninstall.\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user