mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add shell checking to cmdmod since shell can be defined.
This commit is contained in:
parent
620cc3eadc
commit
c58d9aedc2
@ -56,6 +56,10 @@ def _run(cmd,
|
||||
if not cwd:
|
||||
cwd = os.path.expanduser('~{0}'.format('' if not runas else runas))
|
||||
|
||||
if not os.path.isfile(shell) or not os.access(shell, os.X_OK):
|
||||
msg = 'The shell {0} is not available'.format(shell)
|
||||
raise CommandExecutionError(msg)
|
||||
|
||||
# TODO: Figure out the proper way to do this in windows
|
||||
disable_runas = [
|
||||
'Windows',
|
||||
|
Loading…
Reference in New Issue
Block a user