Artifact
010d8a2568ac92507c93f2a39d887b9cdc7f7ade:
- File
lib/fpm/util.rb
— part of check-in
[3e59e52c89]
at
2011-08-02 03:35:56
on branch trunk
— Add "safesystem" function
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
(user:
tabletcorry@gmail.com
size: 178)
[more...]
def safesystem(*call)
return_val = system(*call)
if !return_val
raise "'#{call}' failed with error code: #{$?.exitstatus}"
end
return return_val
end # def safesystem