Skip to content
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
3 changes: 3 additions & 0 deletions sdk/identity/azure-identity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Release History

## 1.4.0b6 (Unreleased)
- `AzureCliCredential` no longer raises an exception due to unexpected output
from the CLI when run by PyCharm (thanks @NVolcz)
([#11362](https://github.com/Azure/azure-sdk-for-python/pull/11362))
- Upgraded minimum `msal` version to 1.3.0
- The async `AzureCliCredential` correctly invokes `/bin/sh`
([#12048](https://github.com/Azure/azure-sdk-for-python/issues/12048))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ def _run_command(command):
try:
working_directory = get_safe_working_dir()

kwargs = {"stderr": subprocess.STDOUT, "cwd": working_directory, "universal_newlines": True}
kwargs = {
"stderr": subprocess.STDOUT,
"cwd": working_directory,
"universal_newlines": True,
"env": dict(os.environ, AZURE_CORE_NO_COLOR="true"),
}
if platform.python_version() >= "3.3":
kwargs["timeout"] = 10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# ------------------------------------
import asyncio
import sys
import os

from azure.core.exceptions import ClientAuthenticationError
from .._credentials.base import AsyncCredentialBase
Expand Down Expand Up @@ -68,7 +69,11 @@ async def _run_command(command):

try:
proc = await asyncio.create_subprocess_exec(
*args, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT, cwd=working_directory
*args,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT,
cwd=working_directory,
env=dict(os.environ, AZURE_CORE_NO_COLOR="true")
)
except OSError as ex:
# failed to execute 'cmd' or '/bin/sh'; CLI may or may not be installed
Expand Down