setup-miniconda
    Preparing search index...

    Function condaCommand

    • Run a conda or mamba CLI command, resolving the executable and setting MAMBA_ROOT_PREFIX when mamba is in use.

      Parameters

      • cmd: string[]

        The conda subcommand and arguments (e.g. ["install", "numpy"]).

      • inputs: IActionInputs

        The parsed action inputs.

      • options: IDynamicOptions

        The current dynamic options.

      • captureOutput: boolean = false

        When true, returns stdout as a string.

      Returns Promise<string | void>

      The captured stdout if captureOutput is true, otherwise void.

      If the command exits with a non-zero return code.

      // Install numpy into the active env
      await condaCommand(["install", "numpy"], inputs, options);

      // Capture JSON config output
      const json = await condaCommand(
      ["config", "--show", "--json"], inputs, options, true
      );