Merge pull request #26110 from jfindlay/tar_sources

check for sources before adding them to cmd str
This commit is contained in:
Mike Place 2015-08-07 15:33:23 -06:00
commit 6d2835b464

View File

@ -103,7 +103,9 @@ def tar(options, tarfile, sources=None, dest=None,
cmd.extend(['-C', '{0}'.format(dest)])
cmd.extend(['-{0}'.format(options), '{0}'.format(tarfile)])
cmd.extend(sources)
if sources:
cmd.extend(sources)
return __salt__['cmd.run'](cmd,
cwd=cwd,