From 9d6a87d9647ab5ea326a5119ae5015044ca1b310 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 6 Nov 2014 14:14:31 +0100 Subject: [PATCH] [mc] Fix the stack-cleaner * '1 => tempfile' does not work on some versions of Ruby; * make sure the system() arg is not passed to the shell. --- tools/stack-cleaner/as | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/stack-cleaner/as b/tools/stack-cleaner/as index dcdb491e48..1a66dd3798 100755 --- a/tools/stack-cleaner/as +++ b/tools/stack-cleaner/as @@ -35,7 +35,9 @@ def wrapped_as(argv) # Generate temp file tempfile = Tempfile.new("as-filter") - unless system(File.dirname($0) + "/clean-stack-filter", 0 => input, 1 => tempfile) + tempfile.close + script = File.dirname($0) + "/clean-stack-filter" + unless system([script, script], 0 => input, 1 => tempfile.path) status=$?.exitstatus FileUtils.rm tempfile exit status -- 2.20.1