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

[scan] Fix device selection issue fallback scenario #21772

Merged
merged 1 commit into from Jan 4, 2024
Merged

[scan] Fix device selection issue fallback scenario #21772

merged 1 commit into from Jan 4, 2024

Conversation

arc-v2
Copy link
Contributor

@arc-v2 arc-v2 commented Jan 4, 2024

Fixes #21768 when there is no device match for a given name.

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

Resolves 21768

Description

This was a regression from 2.218 which introduces nil when the device string did not return a matching item (Steps described in the issue report). It causes the second lambda to not be used and hence there was an error instead of using a default device.

Previously (v2.217.0) it retuned an empty array in such case. This implementation restores the old behaviour by removing all nil values from the array such as [nil] -> []

I have run it locally by installing this gem from source. The rest of the steps are same as per the issue report.

Testing Steps

Fixes #21768 when there is no device match for a given name.
@arc-v2 arc-v2 changed the title Remove 'nil' from array before returning [scan] Remove 'nil' from array before returning Jan 4, 2024
@arc-v2 arc-v2 changed the title [scan] Remove 'nil' from array before returning [scan] Fix device selection issue fallback scenario Jan 4, 2024
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! 🫶

@joshdholtz joshdholtz merged commit 1a5a140 into fastlane:master Jan 4, 2024
2 checks passed
SubhrajyotiSen pushed a commit to KeepTruckin/fastlane that referenced this pull request Jan 17, 2024
Fixes fastlane#21768 when there is no device match for a given name.
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.

[Regression] Scan fails when no device found
2 participants