Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
793eee5b61 | ||
|
|
f2910df050 | ||
|
|
cacb3e3bf1 |
No files matched your search
@@ -271,7 +271,7 @@ Omitting `-Client`/`--client` opens the same selection prompt as install and upd
|
||||
if none of the selected destinations are installed (`Not installed, nothing to uninstall.`), unless previewing with
|
||||
`-DryRun`/`--dry-run`, which always works and never changes anything.
|
||||
|
||||
Because this removes configuration rather than adding it, a real run asks for confirmation (type `yes`) before
|
||||
Because this removes configuration rather than adding it, a real run asks for confirmation (`Continue? [y/N]`) before
|
||||
touching anything, unless `-Force`/`--force` is passed; running without a terminal attached and without `-Force`/`--force`
|
||||
fails instead of hanging. Removal reuses the same manifest-sync logic as install and update: every managed file is
|
||||
backed up under `backups/<timestamp>/` before removal, and a file changed locally since the last install/update is
|
||||
|
||||
@@ -26,9 +26,10 @@ if (-not $DryRun -and -not $Force) {
|
||||
}
|
||||
Write-Host "This removes the managed configuration, extensions, and semantic retrieval setup for $Client under $homePath."
|
||||
Write-Host 'Backups already on disk are kept; anything this setup never installed is left untouched.'
|
||||
$confirm = [Console]::ReadLine()
|
||||
if ($null -eq $confirm -or $confirm.Trim().ToLowerInvariant() -ne 'yes') {
|
||||
Write-Output "Type 'yes' to continue: cancelled, nothing was removed."
|
||||
$confirm = Read-Host -Prompt 'Continue? [y/N]'
|
||||
if ($null -eq $confirm) { $confirm = '' }
|
||||
if ($confirm.Trim().ToLowerInvariant() -notin @('y', 'yes')) {
|
||||
Write-Output 'Cancelled, nothing was removed.'
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,14 @@ if [ "$dry_run" = false ] && [ "$force" = false ]; then
|
||||
fi
|
||||
printf 'This removes the managed configuration, extensions, and semantic retrieval setup for %s under %s.\n' "$client" "$home_path"
|
||||
printf 'Backups already on disk are kept; anything this setup never installed is left untouched.\n'
|
||||
read -r -p "Type 'yes' to continue: " confirm || confirm=""
|
||||
if [ "$confirm" != yes ]; then
|
||||
read -r -p "Continue? [y/N]: " confirm || confirm=""
|
||||
case "$confirm" in
|
||||
[Yy]|[Yy][Ee][Ss]) ;;
|
||||
*)
|
||||
printf 'Cancelled, nothing was removed.\n'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
stamp=$(date +%Y%m%d-%H%M%S)
|
||||
|
||||
Reference in new issue
Block a user