Merge pull request #21995 from jkur/develop

Option handling for archive.tar fails with more uncommon options
This commit is contained in:
jfindlay 2015-03-26 13:09:16 -06:00
commit 5b55c48839

View File

@ -101,8 +101,14 @@ def tar(options, tarfile, sources=None, dest=None,
if dest:
cmd.extend(['-C', '{0}'.format(dest)])
cmd.extend(['-{0}'.format(options), '{0}'.format(tarfile)])
cmd.extend(sources)
if not options.startswith('-'):
options = '-{0}'.format(options)
cmd.extend(options.split(" "))
cmd.extend(['{0}'.format(tarfile)])
if sources is not None:
cmd.extend(sources)
return __salt__['cmd.run'](cmd,
cwd=cwd,