독립 control plane 구성을 위해 기존 Dart CLI/runtime을 runner 앱 경계로 옮기고, 후속 client/core/root 작업을 같은 마일스톤 task group에 연결한다.
32 lines
1.4 KiB
PowerShell
32 lines
1.4 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
# Custom uninstallation steps
|
|
Write-Host "Starting custom uninstallation steps for $env:ChocolateyPackageName..."
|
|
|
|
# Step 1: Delete the installed 'oto.exe' file
|
|
$installPath = Join-Path $env:LOCALAPPDATA "com.toki-labs.oto"
|
|
$otoExePath = Join-Path $installPath "oto.exe"
|
|
|
|
if (Test-Path $otoExePath) {
|
|
Write-Host "Deleting $otoExePath..."
|
|
Remove-Item -Path $otoExePath -Force
|
|
Write-Host "File $otoExePath deleted."
|
|
} else {
|
|
Write-Host "File $otoExePath not found. Skipping deletion."
|
|
}
|
|
|
|
# Step 2: Remove installation path from the PATH environment variable
|
|
Write-Host "Removing '$installPath' from PATH environment variable..."
|
|
$envPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
|
|
if ($envPath -match [regex]::Escape($installPath)) {
|
|
$newPath = ($envPath -split ';') -notmatch [regex]::Escape($installPath) -join ';'
|
|
[System.Environment]::SetEnvironmentVariable("Path", $newPath, [System.EnvironmentVariableTarget]::User)
|
|
Write-Host "Removed '$installPath' from PATH."
|
|
} else {
|
|
Write-Host "'$installPath' not found in PATH. No changes made."
|
|
}
|
|
|
|
# Skip Chocolatey uninstallation logic since no registry uninstall key is available
|
|
Write-Host "Skipping Chocolatey uninstallation logic as no uninstall registry key exists."
|
|
|
|
Write-Host "Custom uninstallation steps for $env:ChocolateyPackageName completed successfully."
|