Skip to content

Commit

Permalink
Update profile.ps1 template (#2207)
Browse files Browse the repository at this point in the history
Update profile.ps1 template to set Disable-AzContextAutosave scope to process instead of current user.
  • Loading branch information
Francisco-Gamino authored Sep 8, 2020
1 parent fa9641a commit b7a269e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Azure.Functions.Cli/StaticResources/profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Authenticate with Azure PowerShell using MSI.
# Remove this if you are not planning on using MSI or Azure PowerShell.
if ($env:MSI_SECRET) {
Disable-AzContextAutosave
Disable-AzContextAutosave -Scope Process | Out-Null
Connect-AzAccount -Identity
}

Expand Down
2 changes: 1 addition & 1 deletion test/Azure.Functions.Cli.Tests/E2E/InitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public Task init_function_app_powershell_enable_managed_dependencies_and_set_def
ContentContains = new []
{
"env:MSI_SECRET",
"Disable-AzContextAutosave",
"Disable-AzContextAutosave -Scope Process | Out-Null",
"Connect-AzAccount -Identity"
}
},
Expand Down

0 comments on commit b7a269e

Please sign in to comment.