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
fpm should check return values #86
Comments
Even better would be to not shell out nearly as often - which is one thing @jordansissel has been working on. That way exceptions would bubble up naturally. |
I will probably wrap some of these with if statements this evening, unless someone else has started work, or has objection. |
On Thu, Jul 28, 2011 at 3:02 PM, tabletcorry <
I could certainly implement a 'set -e'-like system call to replace all 34 For a poor excuse, most of FPM was hacked together in anger and blind rage -Jordan
|
No excuse needed. Rage code is an important part of DevOps :)
|
Basically, its a replacement for system. If the command fails, then it raises an exception and prints out the entire command that was attempted. This will prevent issues where fpm finished (with return code 0) and produces an artifact with real size (>0 bytes) but the artifact is worthless as it contains nothing. Fixes jordansissel#86
See #88 |
Basically, its a replacement for system. If the command fails, then it raises an exception and prints out the entire command that was attempted. This will prevent issues where fpm finished (with return code 0) and produces an artifact with real size (>0 bytes) but the artifact is worthless as it contains nothing. Fixes jordansissel#86
Basically, its a replacement for system. If the command fails, then it raises an exception and prints out the entire command that was attempted. This will prevent issues where fpm finished (with return code 0) and produces an artifact with real size (>0 bytes) but the artifact is worthless as it contains nothing. Fixes jordansissel#86
Basically, its a replacement for system. If the command fails, then it raises an exception and prints out the entire command that was attempted. This will prevent issues where fpm finished (with return code 0) and produces an artifact with real size (>0 bytes) but the artifact is worthless as it contains nothing. Fixes #86
Basically, its a replacement for system. If the command fails, then it raises an exception and prints out the entire command that was attempted. This will prevent issues where fpm finished (with return code 0) and produces an artifact with real size (>0 bytes) but the artifact is worthless as it contains nothing. Fixes #86
It appears that fpm almost never checks return values. In a quick survey of the code, only 2 out of 34 calls to
system()
actually captured the return value.The direct result of this is fpm creating empty packages. As an example, if you try to make a gem into an rpm, and the gem build fails, it will keep going and make the rpm anyways. Considering the significant length of the rpm output, it is easy to miss the actual error output, if you do not scroll up.
I don't suppose there is a
set -e
mode for ruby :)Survey results:
The text was updated successfully, but these errors were encountered: