zf

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

append_extra_config.ex (417B)


      1 defmodule Credo.Execution.Task.AppendExtraConfig do
      2   @moduledoc false
      3 
      4   use Credo.Execution.Task
      5 
      6   alias Credo.Execution
      7 
      8   @extra_config_env_name "CREDO_EXTRA_CONFIG"
      9   @origin_extra_config :env
     10 
     11   def call(exec, _opts) do
     12     case System.get_env(@extra_config_env_name) do
     13       nil -> exec
     14       "" -> exec
     15       value -> Execution.append_config_file(exec, {@origin_extra_config, nil, value})
     16     end
     17   end
     18 end