build/support/cplusplus.rb in passenger-5.1.2 vs build/support/cplusplus.rb in passenger-5.1.3
- old
+ new
@@ -1,7 +1,7 @@
# Phusion Passenger - https://www.phusionpassenger.com/
-# Copyright (c) 2010-2014 Phusion Holding B.V.
+# Copyright (c) 2010-2017 Phusion Holding B.V.
#
# "Passenger", "Phusion Passenger" and "Union Station" are registered
# trademarks of Phusion Holding B.V.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -27,28 +27,29 @@
def run_compiler(*command)
PhusionPassenger.require_passenger_lib 'utils/ansi_colors' if !defined?(PhusionPassenger::Utils::AnsiColors)
show_command = command.join(' ')
puts show_command
if !system(*command)
+ colors = PhusionPassenger::Utils::AnsiColors.new
if $? && $?.exitstatus == 4
# This probably means the compiler ran out of memory.
msg = "<b>" +
"-----------------------------------------------\n" +
"Your compiler failed with the exit status 4. This " +
"probably means that it ran out of memory. To solve " +
"this problem, try increasing your swap space: " +
"https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" +
"</b>"
- fail(PhusionPassenger::Utils::AnsiColors.ansi_colorize(msg))
+ fail(colors.ansi_colorize(msg))
elsif $? && $?.termsig == 9
msg = "<b>" +
"-----------------------------------------------\n" +
"Your compiler was killed by the operating system. This " +
"probably means that it ran out of memory. To solve " +
"this problem, try increasing your swap space: " +
"https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" +
"</b>"
- fail(PhusionPassenger::Utils::AnsiColors.ansi_colorize(msg))
+ fail(colors.ansi_colorize(msg))
else
fail "Command failed with status (#{$? ? $?.exitstatus : 1}): [#{show_command}]"
end
end
end