mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #21995 from jkur/develop
Option handling for archive.tar fails with more uncommon options
This commit is contained in:
commit
5b55c48839
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user