Merge pull request #24649 from cachedout/issue_22385

Improved error reporting for failed states
This commit is contained in:
Thomas S Hatch 2015-06-15 10:04:20 -06:00
commit 9a2b50d59f
2 changed files with 4 additions and 1 deletions

View file

@ -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(

View file

@ -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,