getFunctionTask = async (command, files) => {
  debugLog('Creating Listr tasks for function %o', command)

  const task = async (ctx) => {
    try {
      await command.task(files)
    } catch (e) {
      throw makeErr(command.title, e, ctx)
    }
  }

  return [
    {
      title: command.title,
      task,
    },
  ]
}
Handles function configuration and pushes the tasks into the task array

@param {object} command
@param {Array<string>} files
@throws {Error} If the function configuration is not valid