@sliit-foss/actions-exec-wrapper
Version:
A wrapper around the @actions/exec module which promisifies the console output of a command
17 lines (16 loc) • 504 B
TypeScript
import { ExecOptions } from "@actions/exec";
/**
* @description Runs a given CLI command and return's it's standard output(stdout)
* @param command The command to be run
* @returns Command output wrapped within a promise
* @example
* exec("npm --version")
* .then((result) => {
* console.log(result);
* })
* .catch((error) => {
* console.log(error);
* });
*/
export declare const execute: (command: string, args?: string[], opts?: ExecOptions) => Promise<string>;
export default execute;