From 5c12fad8ea03f72b9c4c324328122402aebd1cc2 Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Thu, 24 Nov 2016 08:28:52 +0000 Subject: [PATCH] acs: *_install_cli mark cli as executable --- .../azure-cli-acs/azure/cli/command_modules/acs/custom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py index a54dae5eacc..f95887fdb32 100644 --- a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py +++ b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py @@ -10,6 +10,7 @@ import os.path import platform import random +import stat import string import subprocess import sys @@ -140,6 +141,7 @@ def dcos_install_cli(install_location=None, client_version='1.8'): logger.info('Downloading client to %s', install_location) try: urlretrieve(file_url, install_location) + os.chmod(install_location, os.stat(install_location).st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH) except IOError as err: raise CLIError('Connection error while attempting to download client ({})'.format(err)) @@ -163,6 +165,7 @@ def k8s_install_cli(client_version="1.4.5", install_location=None): logger.info('Downloading client to %s', install_location) try: urlretrieve(file_url, install_location) + os.chmod(install_location, os.stat(install_location).st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH) except IOError as err: raise CLIError('Connection error while attempting to download client ({})'.format(err))