zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

run_command.ex (493B)


      1 defmodule Credo.Execution.Task.RunCommand do
      2   @moduledoc false
      3 
      4   use Credo.Execution.Task
      5 
      6   alias Credo.Execution
      7 
      8   @exit_status Credo.CLI.ExitStatus.generic_error()
      9 
     10   def call(exec, opts) do
     11     command_name = Execution.get_command_name(exec)
     12     command_mod = Execution.get_command(exec, command_name)
     13 
     14     command_mod.call(exec, opts)
     15   end
     16 
     17   def error(exec, _opts) do
     18     case get_exit_status(exec) do
     19       0 -> put_exit_status(exec, @exit_status)
     20       _ -> exec
     21     end
     22   end
     23 end