final class Shell extends AnyRef

Defines shell utilities to run programs via system process.

runWithInterpreter is necessary for testing because it allows us to shell out to an independent shell whose environment variables we can modify (for example, we can modify PATH so that the shell we run executes a mock version of bloop or python that fails).

Note that there is an exception when the interpretation is enabled: java invocations will be executed as they are because in Windows systems there can be execution problems if the command is too long, which can happen with biggish classpaths (see https://github.com/sbt/sbt-native-packager/issues/72).

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Shell
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Shell(runWithInterpreter: Boolean, detectPython: Boolean)

    runWithInterpreter

    Decides whether we add a layer of indirection when running commands. Uses sh -c in unix systems, cmd.exe in Windows systems

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addAdditionalEnvironmentVariables(env: Map[String, String]): Unit
    Attributes
    protected
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def connectToBloopPort(config: ServerConfig, logger: Logger): Boolean
  8. def deriveCommandForPlatform(cmd0: List[String], attachTerminal: Boolean): List[String]
  9. def detectBloopInSystemPath(binaryCmd: List[String], out: PrintStream): Option[ServerStatus]
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def findCmdInPath(cmd0: String): StatusCommand
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def isPythonInClasspath: Boolean
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def runBloopAbout(binaryCmd: List[String], out: PrintStream): Option[ServerStatus]
  22. def runCommand(cmd0: List[String], cwd: Path, timeoutInSeconds: Option[Long], msgsBuffer: Option[ListBuffer[String]] = None, userOutput: Option[PrintStream] = None, attachTerminal: Boolean = false, useJdkProcessAndInheritIO: Boolean = false): StatusCommand
  23. def runCommand(cmd0: List[String], cwd: Path, timeoutInSeconds: Option[Long], userOutput: Option[PrintStream], attachTerminal: Boolean, useJdkProcessAndInheritIO: Boolean): StatusCommand
  24. def runCommandInheritingIO(cmd0: List[String], cwd: Path, timeoutInSeconds: Option[Long], attachTerminal: Boolean): StatusCommand
  25. def startThread(name: String, daemon: Boolean)(thunk: ⇒ Unit): Thread
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped