setup-miniconda
    Preparing search index...

    Function execute

    • Execute a shell command with custom environment variables, stdout/stderr filtering for known warnings and forced errors, and optional output capture.

      Parameters

      • command: string[]

        The command and arguments to execute.

      • env: {} = {}

        Additional environment variables to merge with process.env.

      • captureOutput: boolean = false

        When true, returns stdout as a string instead of void.

      Returns Promise<string | void>

      The captured stdout string if captureOutput is true, otherwise void.

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

      If stdout contains any substring in constants.FORCED_ERRORS.

      // Run conda info
      await execute(["conda", "info", "--json"]);

      // Capture output
      const output = await execute(["conda", "info", "--json"], {}, true);