mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24649 from cachedout/issue_22385
Improved error reporting for failed states
This commit is contained in:
commit
9a2b50d59f
2 changed files with 4 additions and 1 deletions
|
@ -831,6 +831,9 @@ class State(object):
|
|||
data['__sls__']
|
||||
)
|
||||
)
|
||||
reason = self.states.missing_fun_string(full)
|
||||
if reason:
|
||||
errors.append('Reason: {0}'.format(reason))
|
||||
else:
|
||||
errors.append(
|
||||
'Specified state \'{0}\' was not found'.format(
|
||||
|
|
|
@ -28,7 +28,7 @@ def __virtual__():
|
|||
'''
|
||||
Only load if the npm module is available in __salt__
|
||||
'''
|
||||
return 'npm' if 'npm.list' in __salt__ else False
|
||||
return 'npm' if 'npm.list' in __salt__ else False, '\'npm\' binary not found on system'
|
||||
|
||||
|
||||
def installed(name,
|
||||
|
|
Loading…
Add table
Reference in a new issue