mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Merge pull request #14277 from ansible/default-shell-type
Establish sh as the default shell plugin.
This commit is contained in:
commit
147dba5d97
5 changed files with 30 additions and 1 deletions
|
@ -84,7 +84,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