Repository navigation
chore: clean up aliasing of --pref - #1039
Merged
Merged
Conversation
rpl
approved these changes
Aug 14, 2017
rpl
left a comment
Member
There was a problem hiding this comment.
@kumar303 r+
As briefly discussed over IRC, we should add a runtime check in cmd.run that throws a useful error message if the pref attribute is not of the expected type (mostly because when cmd.run will be used as a library and the caller will be not be covered by the flow type checks as the internal sources).
serendicoder
pushed a commit
to serendicoder/web-ext
that referenced
this pull request
Aug 14, 2017
Rob--W
added a commit
to Rob--W/web-ext
that referenced
this pull request
Aug 5, 2024
The customPrefs alias was introduced in mozilla#1039 as a direct alias, but changed to a shallow copy in mozilla#2436 because the object was modified. These changes have been dropped in mozilla#3136 but the swallow copy remained. This patch completes the cleanup by reverting to a direct alias.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was trying to track down the
--prefoption and I became confused until I realized it was getting aliased inprogram.js. I don't think this is the right place to alias it because it's not an obvious place to look. Also, it introduces an inconsistency since no other option is aliased like that. Most importantly, I'd like to keep the mapping of option names to top-level callback arguments one-to-one, whenever possible, for sanity.