mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ref:44961 - Modified archive.tar to add dest argument at the end of the tar cmd.
This commit is contained in:
parent
e0d7b330fa
commit
23361de8a2
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue