Class ShellLauncher.LaunchConfig

java.lang.Object
org.jruby.util.ShellLauncher.LaunchConfig
Enclosing class:
ShellLauncher

public static class ShellLauncher.LaunchConfig extends Object
  • Field Details

    • runtime

      private final Ruby runtime
    • doExecutableSearch

      private final boolean doExecutableSearch
    • rawArgs

      private final IRubyObject[] rawArgs
    • shell

      private final String shell
    • args

      private final String[] args
    • execArgs

      private String[] execArgs
    • cmdBuiltin

      private boolean cmdBuiltin
    • executable

      private String executable
    • executableFile

      private File executableFile
  • Constructor Details

    • LaunchConfig

      public LaunchConfig(Ruby runtime, IRubyObject[] rawArgs, boolean doExecutableSearch)
  • Method Details

    • shouldRunInProcess

      public boolean shouldRunInProcess()
      Only run an in-process script if the script name has "ruby", ".rb", or "irb" in the name.
    • shouldRunInShell

      public boolean shouldRunInShell()
      This hack is to work around a problem with cmd.exe on windows where it can't interpret a filename with spaces in the first argument position as a command. In that case it's better to try passing the bare arguments to runtime.exec. On all other platforms we'll always run the command in the shell.
    • isBatch

      private boolean isBatch(File executableFile)
    • verifyExecutableForShell

      public void verifyExecutableForShell()
    • verifyExecutableForDirect

      public void verifyExecutableForDirect()
    • verifyExecutable

      private void verifyExecutable()
    • getExecArgs

      public String[] getExecArgs()
    • isCmdBuiltin

      private boolean isCmdBuiltin(String cmd)
    • hasRedirection

      private static boolean hasRedirection(String cmdline)
      Checks a command string to determine if it has I/O redirection characters that require it to be executed by a command interpreter.
    • shouldVerifyPathExecutable

      private static boolean shouldVerifyPathExecutable(String cmdline)