mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user