diff --git a/main.go b/main.go index 7b74efb..0f44a6c 100644 --- a/main.go +++ b/main.go @@ -33,6 +33,7 @@ type Flags struct { TargetURL string `docopt:"-l"` BaseURL string `docopt:"--base-url"` Config string `docopt:"--config"` + Ci bool `docopt:"--ci"` } const ( @@ -70,6 +71,7 @@ Options: [default: auto] -c --config Use the specified configuration file. [default: $HOME/.config/mark] + --ci Runs on CI mode. It won't fail if files are not found. -h --help Show this message. -v --version Show version. ` @@ -121,7 +123,12 @@ func main() { log.Fatal(err) } if len(files) == 0 { - log.Fatal("No files matched") + msg := "No files matched" + if flags.Ci { + log.Warning(msg) + } else { + log.Fatal(msg) + } } // Loop through files matched by glob pattern