         end
       end)
 
-    case res do
-      :error -> {:error, out}
-      :noop -> :noop
-      _ -> :ok
+    cond do
+      :error in res -> {:error, out}
+      :ok in res    -> :ok
+      true          -> :noop
     end
   end
 


          if :ok in res && consolidate_protocols? do
            Mix.Task.reenable("compile.protocols")
            Mix.Task.run("compile.protocols")
          else
            res
          end


    try do
      res = fun.()
      {List.wrap(res), Proxy.stop(proxy_gl)}
    after
      Process.group_leader(self(), original_gl)
      Process.exit(proxy_gl, :kill)
