-
Notifications
You must be signed in to change notification settings - Fork 24
Wrap exec command call with shell to avoid corrupted output #808
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
Conversation
Morriar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be clearer to call /bin/sh -c instead?
|
@Morriar that was the original version but it adds a complexity of having to handle two types of quotes in the string, so a bit more noisy and error-prone. I can change it to Because I was not able to reproduce the issue in local Spoom tests, I personally believe that the fix here is not necessary, and we should find the core issue, while using this branch as a relief point for the team and a guidance on where to look for. |
d51d214 to
29e551a
Compare
|
This is a complex issue so I wanted to share my current understanding of how and why it's happening: At Shopify, many of our dev environments are set up with Nix. In some of our Nix-ified environment, Nix wraps Ruby in an execution script that sets This libtiff directory contains the following file: Shelling out from Ruby mitigates the issue because it forces commands to execute from the system shell, where Sorbet will only load the system version of C++ stdlib, thus preventing the error. |
For one of the issues we've seen internally, wrapping the command call into shell to avoid the issue.
Related: https://github.com/Shopify/team-ruby-dx/issues/1724