Packages

Git hooks in pure Elixir. Configurable file globs, per-hook options, built-in support for mix format, Credo, ExUnit, and Dialyzer.

Current section

Files

Jump to
git_hoox lib mix tasks git_hoox.uninstall.ex
Raw

lib/mix/tasks/git_hoox.uninstall.ex

defmodule Mix.Tasks.GitHoox.Uninstall do
@shortdoc "Remove git_hoox shims from .git/hooks/"
@moduledoc """
Remove only the shims git_hoox installed (identified by marker comment).
Restores the most recent `.backup.*` for each removed shim if present.
"""
use Mix.Task
@impl Mix.Task
@spec run([String.t()]) :: :ok
def run(_argv) do
{:ok, count} = GitHoox.Installer.uninstall()
Mix.shell().info("git_hoox: removed #{count} shim(s)")
:ok
end
end