Skip to content

Make Test-Path more robust#79

Merged
andy1li merged 1 commit intomainfrom
andy/test-path
Mar 6, 2026
Merged

Make Test-Path more robust#79
andy1li merged 1 commit intomainfrom
andy/test-path

Conversation

@andy1li
Copy link
Member

@andy1li andy1li commented Mar 5, 2026

Context:

https://secure.helpscout.net/conversation/3244692401/11524?viewId=8414074

Without -LiteralPath, this error can happen:

image

Note

Low Risk
Low risk: only tweaks Windows installer script path checks and temp cleanup behavior, with minimal impact beyond more reliable installs and slightly different cleanup failure handling.

Overview
Improves the Windows install.ps1 script’s robustness by switching Test-Path calls to -LiteralPath for both the install directory and temp directory checks, avoiding failures with special characters in paths.

Also hardens temp-folder cleanup by wrapping Remove-Item in a try/catch, using -ErrorAction Stop, and emitting a warning if cleanup fails instead of silently ignoring errors.

Written by Cursor Bugbot for commit b371668. This will update automatically on new commits. Configure here.

…improve cleanup error handling. This enhances the robustness of directory operations and ensures warnings are displayed if cleanup fails.
@andy1li andy1li self-assigned this Mar 5, 2026
@andy1li
Copy link
Member Author

andy1li commented Mar 5, 2026

Thanks to @GregMarshall999 for highlighting the issue!

@andy1li andy1li requested a review from rohitpaulk March 5, 2026 07:26
@andy1li andy1li merged commit 934e829 into main Mar 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants