Skip to content

Commit

Permalink
Improved some debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ALCooper12 committed Mar 9, 2022
1 parent 1492e3e commit 940f956
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions cmd/godog/internal/cmd_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package internal
import (
"fmt"
"go/build"
"path/filepath"

"github.com/cucumber/godog/internal/builder"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -37,10 +36,12 @@ The test runner can be executed with the same flags as when using godog run.`,
}

func buildCmdRunFunc(cmd *cobra.Command, args []string) error {
bin, err := filepath.Abs(buildOutput)
if err != nil {
return fmt.Errorf("could not locate absolute path for: %q. reason: %v", buildOutput, err)
}
//bin, err := filepath.Abs(buildOutput)
bin := "/home/arianna/godog/godog.test"
var err error
//if err != nil {
// return fmt.Errorf("could not locate absolute path for: %q. reason: %v", buildOutput, err)
//}

if err = builder.Build(bin); err != nil {
return fmt.Errorf("could not build binary at: %q. reason: %v", buildOutput, err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/godog/internal/cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func buildAndRunGodog(args []string) (err error) {
if err != nil {
return err
}
fmt.Println("Another Message2")
fmt.Printf("building in %v", bin)

if err = builder.Build(bin); err != nil {
fmt.Println("Project Structure is incorrect")
Expand Down

0 comments on commit 940f956

Please sign in to comment.