Ref:44961 - Modified archive.tar to add dest argument at the end of the tar cmd.

This commit is contained in:
Victor 2017-12-14 00:24:11 -05:00 committed by rallytime
parent e0d7b330fa
commit 23361de8a2
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -518,14 +518,14 @@ def tar(options, tarfile, sources=None, dest=None,
raise SaltInvocationError('Tar options can not be empty')
cmd = ['tar']
if dest:
cmd.extend(['-C', '{0}'.format(dest)])
if options:
cmd.extend(options.split())
cmd.extend(['{0}'.format(tarfile)])
cmd.extend(_expand_sources(sources))
if dest:
cmd.extend(['-C', '{0}'.format(dest)])
return __salt__['cmd.run'](cmd,
cwd=cwd,
template=template,