Skip to content

Commit

Permalink
fix(docopts): initialize Go modules before running go build
Browse files Browse the repository at this point in the history
- on the root fork on `master`, there is no `go.mod` yet, so need to create one and add deps
  - I have a PR out that adds this (and more), but it is still under review (and maybe for a good bit): docopt/docopts#65
  • Loading branch information
agilgur5 committed Aug 28, 2022
1 parent 2e33aee commit 30e260b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Formula/docopts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class Docopts < Formula
depends_on "go" => :build

def install
# go mod init + go get b/c 0.6.4 doesn't use Go modules yet (see also my PR: https://github.com/docopt/docopts/pull/65)
system "go", "mod", "init", "github.com/docopt/docopts"
system "go", "get", "github.com/docopt/docopt-go"
system "go", "build", "docopts.go"
prefix.install_metafiles
prefix.install "docopts.sh" # helper functions, meant to be sourced
Expand Down

0 comments on commit 30e260b

Please sign in to comment.