mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use yes $'\n' instead of printf '\n' for pecl commands
This allows extensions with multiple questions to be installed without hanging. See: https://github.com/saltstack/salt/pull/5882#issuecomment-108442378 Note: this only affects pecl functions called with defaults=True.
This commit is contained in:
parent
6b694e3495
commit
dcd9ad8b6e
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ def _pecl(command, defaults=False):
|
|||
'''
|
||||
cmdline = 'pecl {0}'.format(command)
|
||||
if salt.utils.is_true(defaults):
|
||||
cmdline = "printf '\n' | " + cmdline
|
||||
cmdline = 'yes ' + r"$'\n'" + ' | ' + cmdline
|
||||
|
||||
ret = __salt__['cmd.run_all'](cmdline, python_shell=True)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue