mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #45099 from rallytime/bp-44983
Back-port #44983 to 2017.7
This commit is contained in:
commit
54a33c0e1d
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