Skip to content

Commit

Permalink
Merge pull request #3 from bretmartin/master
Browse files Browse the repository at this point in the history
Quote file names since they are used in shell commands
  • Loading branch information
adambullmer authored Dec 9, 2016
2 parents ffd93ed + 746664e commit 4fcffbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

log = logging.getLogger(__name__)

ANSIBLE_COMMAND_TEMPLATE = 'ansible-vault {vault_password} {command} {vault_file}'
ANSIBLE_COMMAND_TEMPLATE = 'ansible-vault {vault_password} {command} "{vault_file}"'


def get_setting(key, default=None):
Expand Down Expand Up @@ -64,7 +64,7 @@ def run_vault_command(self, vault_file_path, password, password_from_file=False)
password_input = password

if password_from_file is True:
vault_password_flag = '--vault-password-file {}'.format(password)
vault_password_flag = '--vault-password-file "{}"'.format(password)
password_input = ''

proc = subprocess.Popen([
Expand Down

0 comments on commit 4fcffbe

Please sign in to comment.