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

Always quote raw args in docker runner #17002

Open
wants to merge 1 commit into
base: develop2
Choose a base branch
from

Conversation

AbrilRBS
Copy link
Member

Changelog: Bugfix: Always quote args in Docker runner
Docs: Omit

This is a small oversight that prevented running commands like
conan create . -o="&:with_foo=True", which in bash would get confussed to try to run with_foo=True

@AbrilRBS AbrilRBS added this to the 2.8.0 milestone Sep 16, 2024
@@ -112,7 +112,7 @@ def __init__(self, conan_api, command, host_profile, build_profile, args, raw_ar

# Update conan command and some paths to run inside the container
raw_args[raw_args.index(args.path)] = self.abs_docker_path
self.command = ' '.join([f'conan {command}'] + [f'"{raw_arg}"' if ' ' in raw_arg else raw_arg for raw_arg in raw_args] + ['-f json > create.json'])
self.command = ' '.join([f'conan {command}'] + [f'"{raw_arg}"' for raw_arg in raw_args] + ['-f json > create.json'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it might be difficult, but it would be great to have some test that covers this, to guarantee it doesn't break in the future.

@AbrilRBS AbrilRBS modified the milestones: 2.8.0, 2.9.0 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants