mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Establish sh as the default shell plugin.
This is a fix for one of the problems pointed out in #14176
This commit is contained in:
parent
a584ab3420
commit
5b1d8cfd5c
5 changed files with 30 additions and 1 deletions
|
@ -83,7 +83,12 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
|||
elif hasattr(self, '_shell_type'):
|
||||
shell_type = getattr(self, '_shell_type')
|
||||
else:
|
||||
shell_type = os.path.basename(C.DEFAULT_EXECUTABLE)
|
||||
shell_type = 'sh'
|
||||
shell_filename = os.path.basename(C.DEFAULT_EXECUTABLE)
|
||||
for shell in shell_loader.all():
|
||||
if shell_filename in shell.COMPATIBLE_SHELLS:
|
||||
shell_type = shell.SHELL_FAMILY
|
||||
break
|
||||
|
||||
self._shell = shell_loader.get(shell_type)
|
||||
if not self._shell:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue