Skip to content

Commit 30d2674

Browse files
committed
Fixes #585
1 parent 0361a8d commit 30d2674

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

powershell/uninstall-step.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
echo ""
2+
$step_path = step.exe path --base
3+
if ( Test-Path -Path $step_path -PathType Container ) {
4+
$Confirm = Read-Host "Remove user configuration directory '$step_path'? [Y/N]"
5+
if ($Confirm -match 'y') {
6+
echo "Removing user configuration directory: '$step_path'"
7+
rm -R $step_path
8+
}
9+
}
210
$install_dir = join-path $env:ProgramW6432 "Smallstep Labs"
311
echo "Uninstalling step: '$install_dir'"
412
rm -R $install_dir
@@ -11,4 +19,4 @@ Stop-Service ssh-agent
1119
Set-Service -Name ssh-agent -StartupType Disabled
1220
Get-Service ssh-agent | Select Name, Status, StartType
1321
echo ""
14-
echo "Done!"
22+
echo "Done!"

0 commit comments

Comments
 (0)