diff --git a/Mutannot/Mutannot.fsproj b/Mutannot/Mutannot.fsproj index cd3d012..7c6381b 100644 --- a/Mutannot/Mutannot.fsproj +++ b/Mutannot/Mutannot.fsproj @@ -11,6 +11,7 @@ + diff --git a/Mutannot/Program.fs b/Mutannot/Program.fs index 5b77edb..e7195fc 100644 --- a/Mutannot/Program.fs +++ b/Mutannot/Program.fs @@ -1,2 +1,17 @@ +open Fli + [] -let main argv = 0 +let main argv = + let gitState = + cli { + Exec "git" + Arguments [ "status"; "--porcelain" ] + } + |> Command.execute + |> Output.throwIfErrored + + if gitState.Text <> None then + eprintfn "Uncommitted changes. Refusing to run." + exit 1 + + 0