bump version, update error handling on main command
Этот коммит содержится в:
родитель
70af4fc5a7
коммит
320a5612c1
3 изменённых файлов: 7 добавлений и 5 удалений
|
@ -41,9 +41,9 @@ func buildAndRun() (int, error) {
|
|||
cmdb := exec.Command("go", "test", "-c", "-o", bin)
|
||||
cmdb.Dir = dir
|
||||
cmdb.Env = os.Environ()
|
||||
if dat, err := cmdb.CombinedOutput(); err != nil {
|
||||
fmt.Println(string(dat))
|
||||
return 1, nil
|
||||
if details, err := cmdb.CombinedOutput(); err != nil {
|
||||
fmt.Println(string(details))
|
||||
return 1, err
|
||||
}
|
||||
defer os.Remove(bin)
|
||||
|
||||
|
@ -78,7 +78,8 @@ func buildAndRun() (int, error) {
|
|||
func main() {
|
||||
status, err := buildAndRun()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
// it might be a case, that status might not be resolved
|
||||
// in some OSes. this is attempt to parse it from stderr
|
||||
|
|
|
@ -4,6 +4,7 @@ import "gopkg.in/cucumber/gherkin-go.v3"
|
|||
|
||||
// examples is a helper func to cast gherkin.Examples
|
||||
// or gherkin.BaseExamples if its empty
|
||||
// @TODO: this should go away with gherkin update
|
||||
func examples(ex interface{}) (*gherkin.Examples, bool) {
|
||||
t, ok := ex.(*gherkin.Examples)
|
||||
return t, ok
|
||||
|
|
2
godog.go
2
godog.go
|
@ -44,4 +44,4 @@ Godog was inspired by Behat and the above description is taken from it's documen
|
|||
package godog
|
||||
|
||||
// Version of package - based on Semantic Versioning 2.0.0 http://semver.org/
|
||||
const Version = "v0.2.0"
|
||||
const Version = "v0.4.0"
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче