Module

GitHub.Actions.Exec

Package
purescript-github-actions-toolkit
Repository
purescript-contrib/purescript-github-actions-toolkit

Exports functions from the @actions/exec module provided by GitHub https://github.com/actions/toolkit/tree/main/packages/exec

#exec Source

exec :: ExecArgs -> ExceptT Error Aff Number

Executes a command on the command line, with arguments Output will be streamed to the live console. Provides return code

#exec' Source

exec' :: String -> ExceptT Error Aff Number

Executes a command on the command line. Uses defaults for args and options

#ExecArgs Source

type ExecArgs = { args :: Maybe (Array String), command :: String, options :: Maybe ExecOptions }

commandLine: command to execute (can include additional args). Must be correctly escaped. args: optional arguments for tool. Escaping is handled by the lib. Defaults to empty array. options: optional exec options. See ExecOptions

#ExecOptions Source

type ExecOptions = { cwd :: Maybe String, delay :: Maybe Number, env :: Maybe (Object String), errStream :: Maybe (Writable ()), failOnStdErr :: Maybe Boolean, ignoreReturnCode :: Maybe Boolean, input :: Maybe Buffer, listeners :: Maybe ExecListeners, outStream :: Maybe (Writable ()), silent :: Maybe Boolean, windowsVerbatimArguments :: Maybe Boolean }

cwd: working directory. defaults to current env: envvar dictionary. defaults to current process's env silent: defaults to false outStream: Defaults to process.stdout errStream: Defaults to process.stderr windowsVerbatimArguments: whether to skip quoting/escaping arguments if needed. defaults to false failOnStdErr: whether to fail if output to stderr. defaults to false ignoreReturnCode: defaults to failing on non zero. ignore will not fail leaving it up to the caller delay: How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 input: input to write to the process on STDIN listeners: Listeners for output. Callback functions that will be called on these events

#defaultExecOptions Source

defaultExecOptions :: ExecOptions

Defaults for ExecOptions. Override as needed.

#ExecListeners Source

type ExecListeners = { debug :: Maybe (String -> Effect Unit), errline :: Maybe (String -> Effect Unit), stderr :: Maybe (Buffer -> Effect Unit), stdline :: Maybe (String -> Effect Unit), stdout :: Maybe (Buffer -> Effect Unit) }

Listeners for output. Callback functions that will be called on these events

#defaultExecListeners Source

defaultExecListeners :: ExecListeners

Defaults for ExecListeners. Override as needed.