Skip to content

Commit e2f55ec

Browse files
DaeunYimjiasli
andauthored
[RDBMS] Fix operations.py file installing dependencies in CloudShell (#21553)
* only install dependencies when not in cloudshell * Reolve comment * Update operations.py * Update operations.py Co-authored-by: Jiashuo Li <4003950+jiasli@users.noreply.github.com>
1 parent 7035b19 commit e2f55ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/azure-cli-core/azure/cli/core/extension/operations.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ def _add_whl_ext(cli_ctx, source, ext_sha256=None, pip_extra_index_urls=None, pi
181181

182182

183183
def _install_deps_for_psycopg2(): # pylint: disable=too-many-statements
184+
# If we are in Cloud Shell, dependencies should have already been installed.
185+
from azure.cli.core.util import in_cloud_console
186+
if in_cloud_console():
187+
return
188+
184189
# Below system dependencies are required to install the psycopg2 dependency for Linux and macOS
185190
import platform
186191
import subprocess

0 commit comments

Comments
 (0)