mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Now and/or shell expressions depend on shell plugin
This should fix issues with fish shell users as && and || are not valid syntax, fish uses actual 'and' and 'or' programs. Also updated to allow for fish backticks pushed quotes to subshell, fish seems to handle spaces w/o them. Lastly, removed encompassing subshell () for fish compatibility. fixes #13199
This commit is contained in:
parent
cfeef81303
commit
26520442bd
2 changed files with 19 additions and 6 deletions
|
@ -21,5 +21,12 @@ from ansible.plugins.shell.sh import ShellModule as ShModule
|
|||
|
||||
class ShellModule(ShModule):
|
||||
|
||||
_SHELL_AND = '; and'
|
||||
_SHELL_OR = '; or'
|
||||
_SHELL_SUB_LEFT = '('
|
||||
_SHELL_SUB_RIGHT = ')'
|
||||
_SHELL_GROUP_LEFT = ''
|
||||
_SHELL_GROUP_RIGHT = ''
|
||||
|
||||
def env_prefix(self, **kwargs):
|
||||
return 'env %s' % super(ShellModule, self).env_prefix(**kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue