Do not fail uninstall when PowerShell profile cleanup fails#74
Do not fail uninstall when PowerShell profile cleanup fails#74a-rookie-of-C-language wants to merge 1 commit into
Conversation
caomengxuan666
left a comment
There was a problem hiding this comment.
It seems correct.Have you ever tested it at the same env?Or run a smoke test on it?
|
是的,我做过了一次测试,日志显示 |
| if IgnoreFailure then | ||
| begin | ||
| Log('Skipping PowerShell profile update because pwsh.exe could not be executed'); | ||
| Exit; | ||
| end; | ||
| RaiseException('Failed to execute pwsh.exe'); |
There was a problem hiding this comment.
This error cannot occur, because on installation we first check if pwsh.exe is installed and works. RunPwshScript is not called otherwise.
|
@a-rookie-of-C-language Could you explain what this PR improves over #40? |
|
当本机没有
|
|
我使用git worktree复现了 #40 无法解决的内容 而 #74 的日志为 |
|
这类损坏不一定是用户手动造成的,也可能是磁盘错误、杀毒软件隔离、不完整的上一次安装等导致的,属于卸载程序应当处理的边缘情况,而不是前提条件不满足,当然我上面为了方便测试是手动损坏的 |

Summary
close #73
Make uninstall robust to PowerShell profile cleanup failures.
PowerShell profile cleanup is now skipped when
pwsh.exeis unavailable orunsupported, and cleanup failures during uninstall are logged instead of aborting
the uninstall process.
Install-time PowerShell integration behavior remains strict when integration is
selected.
Validation
git diff --checkISCC.exeis unavailable