mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix the copy module to use the argsfile method
This commit is contained in:
parent
917f929e86
commit
aeea46678d
1 changed files with 8 additions and 2 deletions
10
library/copy
10
library/copy
|
@ -32,8 +32,14 @@ except ImportError:
|
|||
# to a dictionary
|
||||
# FIXME: make more idiomatic
|
||||
|
||||
args = " ".join(sys.argv[1:])
|
||||
items = shlex.split(args)
|
||||
if len(sys.argv) == 1:
|
||||
sys.exit(1)
|
||||
argfile = sys.argv[1]
|
||||
if not os.path.exists(argfile):
|
||||
sys.exit(1)
|
||||
items = shlex.split(open(argfile, 'r').read())
|
||||
|
||||
|
||||
params = {}
|
||||
for x in items:
|
||||
(k, v) = x.split("=")
|
||||
|
|
Loading…
Reference in a new issue