gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
933 stars 63 forks source link

Using quotes to construct more complex commands doesn't work #55

Closed infraredgirl closed 2 years ago

infraredgirl commented 2 years ago

git-xargs version v0.0.12

To Reproduce This fails: git-xargs --loglevel=DEBUG --dry-run --branch-name test --repo gruntwork-io/git-xargs "touch a && touch b"

and so does even this: git-xargs --loglevel=DEBUG --dry-run --branch-name test --repo gruntwork-io/git-xargs "touch a"

while this works git-xargs --loglevel=DEBUG --dry-run --branch-name test --repo gruntwork-io/git-xargs touch a

So it seems that quotes are the problem, but they are necessary to construct complex commands.

infraredgirl commented 2 years ago

I figured out how to make this work:

git-xargs --loglevel=DEBUG --dry-run --branch-name test --repo gruntwork-io/git-xargs bash -c "touch a && touch b"

No changes in git-xargs required. I'm closing this issue - consider this a PEBKAC. 😄

zackproser commented 2 years ago

I wonder if this one would be a good candidate for a Knowledge Base? Would that be useful?

infraredgirl commented 2 years ago

I think that makes sense!