c

moped.cli

SpawnableProcess

final class SpawnableProcess extends AnyRef

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

Instance Constructors

  1. new SpawnableProcess(command: Seq[Shellable], env: Environment, mocked: List[Application])

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def call(cwd: Path = null, env: Map[String, String] = null, stdin: ProcessInput = Pipe, stdout: ProcessOutput = Pipe, stderr: ProcessOutput = os.Inherit, mergeErrIntoOut: Boolean = false, timeout: Long = -1, check: Boolean = true, propagateEnv: Boolean = true): CommandResult

    Invokes the given subprocess like a function, passing in input and returning a CommandResult.

    Invokes the given subprocess like a function, passing in input and returning a CommandResult. You can then call result.exitCode to see how it exited, or result.out.bytes or result.err.string to access the aggregated stdout and stderr of the subprocess in a number of convenient ways. If a non-zero exit code is returned, this throws a os.SubprocessException containing the CommandResult, unless you pass in check = false.

    If you want to spawn an interactive subprocess, such as vim, less, or a python shell, set all of stdin/stdout/stderr to os.Inherit

    call provides a number of parameters that let you configure how the subprocess is run:

    cwd

    the working directory of the subprocess

    env

    any additional environment variables you wish to set in the subprocess

    stdin

    any data you wish to pass to the subprocess's standard input

    stdout

    How the process's output stream is configured.

    stderr

    How the process's error stream is configured.

    mergeErrIntoOut

    merges the subprocess's stderr stream into it's stdout

    timeout

    how long to wait for the subprocess to complete

    check

    disable this to avoid throwing an exception if the subprocess fails with a non-zero exit code

    propagateEnv

    disable this to avoid passing in this parent process's environment variables to the subprocess

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. def spawn(cwd: Path = null, env: Map[String, String] = null, stdin: ProcessInput = Pipe, stdout: ProcessOutput = Pipe, stderr: ProcessOutput = os.Inherit, mergeErrIntoOut: Boolean = false, propagateEnv: Boolean = true): SubProcess

    The most flexible of the os.proc calls, os.proc.spawn simply configures and starts a subprocess, and returns it as a java.lang.Process for you to interact with however you like.

    The most flexible of the os.proc calls, os.proc.spawn simply configures and starts a subprocess, and returns it as a java.lang.Process for you to interact with however you like.

    To implement pipes, you can spawn a process, take it's stdout, and pass it as the stdin of a second spawned process.

    Note that if you provide ProcessOutput callbacks to stdout/stderr, the calls to those callbacks take place on newly spawned threads that execute in parallel with the main thread. Thus make sure any data processing you do in those callbacks is thread safe!

  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped