Fix behavior of is_link() function when a check fails

This commit is contained in:
Lance Edgar 2019-09-13 17:53:28 -05:00
parent 5a9035ffd3
commit cd421f3aa1

View file

@ -60,7 +60,7 @@ def is_link(c, path, use_sudo=False):
"""
func = c.sudo if use_sudo else c.run
cmd = 'test -L "$(echo %s)"' % path
result = func(cmd)
result = func(cmd, warn=True)
return False if result.failed else True