diff --git a/src/azure-cli/az b/src/azure-cli/az index 96ee4dc639f..c69a06001ac 100644 --- a/src/azure-cli/az +++ b/src/azure-cli/az @@ -1,5 +1,6 @@ #!/usr/bin/env python +import runpy import sys import os @@ -16,4 +17,4 @@ else: if os.environ.get('AZ_INSTALLER') is None: os.environ['AZ_INSTALLER'] = 'PIP' -os.execl(sys.executable, sys.executable, '-m', 'azure.cli', *sys.argv[1:]) +runpy.run_module('azure.cli')