Make sure to copy connectionType for the azure shell#12147
Merged
1 commit merged intomainfrom Jan 12, 2022
Merged
Conversation
miniksa
approved these changes
Jan 12, 2022
lhecker
reviewed
Jan 12, 2022
Comment on lines
+354
to
357
| if (source.ConnectionType() != winrt::guid{}) | ||
| { | ||
| duplicated->ConnectionType(source.ConnectionType()); | ||
| } |
Member
There was a problem hiding this comment.
In Go you have this idiom where you write:
if foo := bar(); foo != 123 {
baz(foo);
}You can write the same in C++:
if (const auto type = source.ConnectionType(); type != winrt::guid{})
{
duplicated->ConnectionType(type);
}I personally find this idiom quite fitting for such situations.
lhecker
approved these changes
Jan 12, 2022
carlos-zamora
approved these changes
Jan 12, 2022
Member
|
@msftbot merge this in 5 minutes |
|
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
DHowett
pushed a commit
that referenced
this pull request
Jan 21, 2022
This was a simple oversight. No user profile ever has `connectionType` set, because why would they. So even for the Azure Shell, which needed this, the check would fail and we'd forget to duplicate the connectionType to the new profile. * [x] I work here * [x] Closes #12120 * [x] Tested manually (cherry picked from commit eb83469)
|
🎉 Handy links: |
This pull request was closed.
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.
This was a simple oversight. No user profile ever has
connectionTypeset, because why would they. So even for the Azure Shell, which needed this, the check would fail and we'd forget to duplicate the connectionType to the new profile.