Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for list kwargs #529

Closed
kumarappan-arumugam opened this issue May 10, 2020 · 2 comments
Closed

Support for list kwargs #529

kumarappan-arumugam opened this issue May 10, 2020 · 2 comments
Labels

Comments

@kumarappan-arumugam
Copy link

For ex:

s3cmd_options = dict(
    cache_control="public, max-age={}".format(365 * 24 * 60 * 60),
    exclude="*",
    include=[
        "bar/assets/*",
        "foo/assets/*",
    ],
)
sh.aws.s3.sync(local_path, dest_path, **s3cmd_options)

Expected:
/usr/bin/aws s3 sync local_path dest_path --exclude=* --include=bar/assets/* --include=foo/assets/* --cache-control=public, max-age=31536000

Actual:
/usr/bin/aws s3 sync local_path dest_path --exclude=* --include=['bar/assets/*', 'foo/assets/*'] --cache-control=public, max-age=31536000

Most of the command line args do not support array arg value (maybe space-separated string). I know this can be worked around by sending array as sh.aws.s3.sync(local_path, dest_path, '--include="bar/assets/*"', '--include="foo/assets/*"') but that kind of defeats the purpose of passing kwargs. Maybe there is a way to do this that I'm missing.

@amoffat
Copy link
Owner

amoffat commented May 10, 2020

There is no way to do that currently, but it seems like a fair request at first glance.

@amoffat
Copy link
Owner

amoffat commented Feb 9, 2023

Thanks for the feature suggestion, this is now implemented in 2.0.0

@amoffat amoffat closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants