Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/generate-bindings/generate-bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ func (h *handler) ResolveInputs(args []string, v *viper.Viper) (Inputs, error) {
projectRoot = currentDir
}

if _, err := os.Stat(projectRoot); err != nil {
return Inputs{}, fmt.Errorf("project root not found: %s", projectRoot)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. this is only required because we are validating the contracts path. Both are then checked again using go validators in the struct so seems a little redundant? wdyt?

}

contractsPath := filepath.Join(projectRoot, "contracts")
if _, err := os.Stat(contractsPath); err != nil {
return Inputs{}, fmt.Errorf("contracts folder not found in project root: %s", contractsPath)
Expand Down
Loading