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
[screengrab] Fix escaping issue with adb path (#15981) #15986
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Just checked the failing tests on Circle CI and I don't think they are related to the changes I made in this PR. It was probably failing because of the timing of the tests: The tests started at the end of the 6th of February but the check was done at the beginning of the 7th of February. So, just re-running the tests will fix the CI (can't do it myself though). Update: Just reported the failing tests as a separate issue in #15987. Update 2: I just force-pushed to force Circle CI to re-run the tests. Should pass now! |
5818a5b
to
7a7303f
Compare
How do you know that? I think the problem is somewhere in the handling of an env var: #15981 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this is the actual problem or a good solution.
@janpio Good point, I've updated the solution to expand the |
05f7810
to
811732a
Compare
Ok, my feedback made sense in theory but in practice tests are not failing as they expect the unexpanded paths. Does that make sense? Should we update the tests? Or could this have any side effects? Should not, right? |
@janpio I don't think it will have any side effects, but tests will become more cumbersome and less readable since we need to change things like I'm reverting the last commit then, tell me if you rather prefer to update the tests instead. But to be honest, I don't understand why |
That is just a bad example filename for a test that uses fastlane/fastlane/spec/actions_specs/adb_spec.rb Lines 4 to 10 in 39afb4d
|
I see, thanks for the explanation. What is your opinion on the code of this PR? If you don't mind, we just merge it as is for the reasons explained above. It fixes the issue with the |
I think we should undo the last commit, and then just call |
f93cf72
to
129d02b
Compare
@janpio Okay, reverted back to the solution where we expand the |
And we uncovered a problem on WIndows with that:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful and beautiful. Let's see if @joshdholtz agrees.
e301295
to
1c18ab6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for looking into this ❤️ Really appreciate the contribution!
Hey @Jeehut 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
Fixes #15981.
Description
I've removed the escaping of the
adb
tool path as that added a\
in front of the path which caused the issue. There's no need for shellescaping from my understanding of the examples and documentation pages for paths, especially since this path doesn't include any whitespaces.Testing Steps
Just make sure
fastlane screengrab
is still working on different platforms. I've tested macOS only.