Refuse to run if git repo is dirty
This commit is contained in:
parent
3bc0c4e9e8
commit
6728ffeee8
2 changed files with 17 additions and 1 deletions
|
|
@ -1,2 +1,17 @@
|
|||
open Fli
|
||||
|
||||
[<EntryPoint>]
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue