Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Appium install PowerShell script #22883

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Fix Appium install PowerShell script #22883

merged 1 commit into from
Jun 7, 2024

Conversation

jfversluis
Copy link
Member

Description of Change

The PowerShell script would check if APPIUM_HOME is set, but when its not and returns null, the subsequent Test-Path would throw a null reference exception.

@jfversluis jfversluis added t/housekeeping ♻︎ area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions labels Jun 6, 2024
@jfversluis jfversluis requested a review from a team as a code owner June 6, 2024 08:55
if (Test-Path $AppiumHome) {
Write-Output "Removing existing APPIUM_HOME Cache..."
Remove-Item -Path $AppiumHome -Recurse -Force
if ($AppiumHome) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use Write-Output indicating that needs to set the APPIUM_HOME if is null?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the point here is that it tries to find Appium and if it doesn't find it or its not the version we expect then its going to uninstall and install: https://github.com/dotnet/maui/pull/22883/files#diff-2d6fe919f8e6585ce7f9aa99776ffc5fe0e737205eca6b3cf0a5ab6576a42870R90

This check only make sure that the script doesn't crash on a null reference exception when its not installed

@rmarinho rmarinho requested a review from Redth June 6, 2024 14:25
@rmarinho rmarinho merged commit 93a1bc4 into main Jun 7, 2024
49 checks passed
@rmarinho rmarinho deleted the appium-install-fix branch June 7, 2024 17:04
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions t/housekeeping ♻︎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants