Skip to content


Use LaunchConfig to detect sh/cmd commands in popen. Fixes #2505.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Feb 24, 2015
1 parent 258be73 commit 0ca486c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/util/
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0ca486c

Please sign in to comment.