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

[core] Suppress output of PlistBuddy when disabling "KeyboardContinuousPathEnabled" #16123

Merged
merged 1 commit into from Mar 23, 2020

Conversation

robnadin
Copy link
Contributor

@robnadin robnadin commented Mar 5, 2020

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've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Suppress the error output from PlistBuddy when the KeyboardContinuousPathEnabled key already exists in the simulator's preferences. On some CI systems this manifests as an error in the build log:

Add: ":KeyboardContinuousPathEnabled" Entry Already Exists

Description

Testing Steps

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.

Would you be able to add some more in the description of this PR on the need for it? Was the output too verbose? I don't remember what happens 🙃

And maybe we could change to using print: false on backticks way to all hide output? Or is it helpful to see the command that is being executed? print: false would hide both the command and the output.

@@ -223,7 +223,7 @@ def disable_slide_to_type
plist_buddy_cmd = "-c \"Add :KeyboardContinuousPathEnabled bool false\""
plist_path = File.expand_path("~/Library/Developer/CoreSimulator/Devices/#{self.udid}/data/Library/Preferences/com.apple.keyboard.ContinuousPath.plist")

Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path}")
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path} >/dev/null 2>&1")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path} >/dev/null 2>&1")
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path}", print: false)

This should also work if you want to try this 😊 ☝️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, after trying this, because the output is an error it is still printed 😠

@robnadin
Copy link
Contributor Author

robnadin commented Mar 5, 2020

Would you be able to add some more in the description of this PR on the need for it? Was the output too verbose? I don't remember what happens 🙃

Updated description with some context.

@joshdholtz joshdholtz changed the title Suppress output of PlistBuddy when disabling "KeyboardContinuousPathE… [core] Suppress output of PlistBuddy when disabling "KeyboardContinuousPathE… Mar 23, 2020
@joshdholtz joshdholtz changed the title [core] Suppress output of PlistBuddy when disabling "KeyboardContinuousPathE… [core] Suppress output of PlistBuddy when disabling "KeyboardContinuousPathEnabled" Mar 23, 2020
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.

Looks good! Thanks for the contribution ❤️ Really appreciate it!

@joshdholtz joshdholtz merged commit 1f67059 into fastlane:master Mar 23, 2020
@fastlane-bot
Copy link

Hey @robnadin 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

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

Congratulations! 🎉 This was released as part of fastlane 2.144.0 🚀

@robnadin robnadin deleted the suppress-plistbuddy-output branch March 25, 2020 14:24
@fastlane fastlane locked and limited conversation to collaborators May 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants