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

command/run: fix concurrent writes to the flags list #335

Merged
merged 4 commits into from
Aug 5, 2021
Merged

Conversation

igungor
Copy link
Member

@igungor igungor commented Aug 3, 2021

The run command iterates over the commands list, where each item is a
pointer to the command. urfave/cli packages implicitly adds -h flag
to each command, which introduces data race because s5cmd executes
them in parallel.

Fixes #301

The `run` command iterates over the commands list, where each item is a
pointer to the command. `urfave/cli` packages implicitly adds `-h` flag
to each command, which introduces data race because `s5cmd` executes
them in parallel.

Fixes #301
@igungor igungor requested a review from sonmezonur August 3, 2021 13:50
@igungor
Copy link
Member Author

igungor commented Aug 3, 2021

@ocakhasan

@igungor igungor marked this pull request as ready for review August 3, 2021 15:52
@igungor igungor requested a review from a team as a code owner August 3, 2021 15:52
@igungor igungor requested review from aykutfarsak and removed request for a team August 3, 2021 15:52
@igungor
Copy link
Member Author

igungor commented Aug 5, 2021

@aykutfarsak ping

@igungor igungor merged commit babc8d5 into master Aug 5, 2021
@igungor igungor deleted the safecmd branch August 5, 2021 15:40
@nelhage
Copy link
Contributor

nelhage commented Aug 5, 2021

Would you mind cutting a release containing this fix? I'd love to pull it in and re-try the code paths we'd disabled due to #301, and it would be easier for me to do so with a release.

@igungor
Copy link
Member Author

igungor commented Aug 13, 2021

Would you mind cutting a release containing this fix? I'd love to pull it in and re-try the code paths we'd disabled due to #301, and it would be easier for me to do so with a release.

We've released v1.4.0-rc.1.

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.

Error: panic: cp flag redefined: help from s5cmd run
4 participants