Skip to content
Permalink
Browse files
Use LaunchConfig to detect sh/cmd commands in popen. Fixes #2505.
  • Loading branch information
headius committed Feb 24, 2015
1 parent 258be73 commit 0ca486cfaeb919545d8f32578f2626988a2863bb
Showing 1 changed file with 2 additions and 1 deletion.
@@ -748,7 +748,8 @@ private static Process popenShared(Ruby runtime, IRubyObject[] strings, Map env,
}

String[] args = parseCommandLine(runtime.getCurrentContext(), runtime, strings);
boolean useShell = false;
LaunchConfig lc = new LaunchConfig(runtime, strings, false);
boolean useShell = lc.shouldRunInShell();
if (addShell) for (String arg : args) useShell |= shouldUseShell(arg);

// CON: popen is a case where I think we should just always shell out.

0 comments on commit 0ca486c

Please sign in to comment.