### Method

# Foundry Command prepare

#### Declaration [src]

    DexFuture*
    foundry_command_prepare (
      FoundryCommand* self,
      FoundryBuildPipeline* pipeline,
      FoundryProcessLauncher* launcher,
      FoundryBuildPipelinePhase phase
    )

#### Description [src]

Prepares `launcher` to run `self`.

If `pipeline` is set, the command may use that to run the command within a particular environment based on the locality settings.

#### Parameters

`pipeline`

  Type: `FoundryBuildPipeline`

  An optional `FoundryBuildPipeline`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`launcher`

  Type: `FoundryProcessLauncher`

  A `FoundryProcessLauncher`.

  The data is owned by the caller of the method.

`phase`

  Type: `FoundryBuildPipelinePhase`

  The phase of the pipeline.

#### Return value

Type: `DexFuture`

A `DexFuture` that resolves to any value when the preparation has completed. Otherwise rejects with error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.