mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #26110 from jfindlay/tar_sources
check for sources before adding them to cmd str
This commit is contained in:
commit
6d2835b464
1 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue