From c4ffed8a441fb0f16f0d206218b3580ae4460797 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 13 Apr 2015 00:55:14 +0000 Subject: escape INFILE and related environment variables We may expand them, so ensure they're properly escaped, first for use in shell snippets. --- lib/dtas/partstats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dtas/partstats.rb') diff --git a/lib/dtas/partstats.rb b/lib/dtas/partstats.rb index 9d3312b..bc13480 100644 --- a/lib/dtas/partstats.rb +++ b/lib/dtas/partstats.rb @@ -55,7 +55,7 @@ class DTAS::PartStats rd, wr = IO.pipe env = opts[:env] env = env ? env.dup : {} - env["INFILE"] = @infile + env["INFILE"] = xs(@infile) env["TRIMFX"] = "trim #{trim_part.tbeg}s #{trim_part.tlen}s" opts = { pgroup: true, close_others: true, err: wr } pid = spawn(env, CMD, opts) -- cgit v1.2.3-24-ge0c7