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

Fix issue where error is thrown when passing context to Set-AzureRmResource #6804

Merged
merged 2 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,16 @@ public abstract class ResourceManipulationCmdletBase : ResourceManagerCmdletBase
/// <summary>
/// Initializes the default subscription id if needed.
/// </summary>
public ResourceManipulationCmdletBase()
public ResourceManipulationCmdletBase() {}

protected override void OnProcessRecord()
{
if (string.IsNullOrEmpty(this.ResourceId))
{
this.SubscriptionId = DefaultContext.Subscription.GetId();
}
}

protected override void OnProcessRecord()
{
base.OnProcessRecord();
}

/// <summary>
/// Gets the resource Id from the supplied PowerShell parameters.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/Resources/Commands.Resources/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Fix issue where error is thrown when passing a context to `Set-AzureRmResource`
- https://github.com/Azure/azure-powershell/issues/5705
* Fix example in New-AzureRmResourceGroupDeployment

## Version 6.3.0
Expand Down