-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Make sure to copy connectionType
for the azure shell
#12147
Conversation
if (source.ConnectionType() != winrt::guid{}) | ||
{ | ||
duplicated->ConnectionType(source.ConnectionType()); | ||
} |
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.
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.
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.
indeed!
@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". |
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 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.