diff --git a/dev-tools/mage/gotool/noticer.go b/dev-tools/mage/gotool/noticer.go index 26669c3f..9c493b3b 100644 --- a/dev-tools/mage/gotool/noticer.go +++ b/dev-tools/mage/gotool/noticer.go @@ -26,7 +26,9 @@ var NoticeGenerator goNoticeGenerator = runGoNoticeGenerator func runGoNoticeGenerator(opts ...ArgOpt) error { args := buildArgs(opts).build() - return sh.RunV("go-licence-detector", args...) + + return sh.RunV("go", + append([]string{"run", "go.elastic.co/go-licence-detector"}, args...)...) } func (goNoticeGenerator) Dependencies(path string) ArgOpt { return flagArg("-in", path) } diff --git a/dev-tools/mage/install.go b/dev-tools/mage/install.go index 776f90be..ee412502 100644 --- a/dev-tools/mage/install.go +++ b/dev-tools/mage/install.go @@ -23,8 +23,8 @@ var ( // GoLicenserImportPath controls the import path used to install go-licenser. GoLicenserImportPath = "github.com/elastic/go-licenser@latest" - // GoNoticeGeneratorImportPath controls the import path used to install go-licence-detector. - GoNoticeGeneratorImportPath = "go.elastic.co/go-licence-detector@latest" + // // GoNoticeGeneratorImportPath controls the import path used to install go-licence-detector. + // GoNoticeGeneratorImportPath = "go.elastic.co/go-licence-detector@latest" ) // InstallGoLicenser target installs go-licenser @@ -34,9 +34,9 @@ func InstallGoLicenser() error { ) } -// InstallGoNoticeGen target installs go-licenser -func InstallGoNoticeGen() error { - return gotool.Install( - gotool.Install.Package(GoNoticeGeneratorImportPath), - ) -} +// // InstallGoNoticeGen target installs go-licenser +// func InstallGoNoticeGen() error { +// return gotool.Install( +// gotool.Install.Package(GoNoticeGeneratorImportPath), +// ) +// } diff --git a/dev-tools/mage/notice.go b/dev-tools/mage/notice.go index 75f49e1c..6f3c04ad 100644 --- a/dev-tools/mage/notice.go +++ b/dev-tools/mage/notice.go @@ -27,7 +27,7 @@ import ( ) func GenerateNotice(overrides, rules, noticeTemplate string) error { - mg.Deps(InstallGoNoticeGen, Deps.CheckModuleTidy) + mg.Deps(Deps.CheckModuleTidy) err := gotool.Mod.Download(gotool.Download.All()) if err != nil {