From a3b3eada8f82d1cd16d9af794d71547a7eaeb426 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 25 Jan 2022 18:11:12 +0800 Subject: [PATCH] fix: build hashicorp plugin failed when creating scaffold --- internal/scaffold/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index 25ae49f..5db3517 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -65,6 +65,11 @@ func CreateScaffold(projectName string) error { return err } + // create go mod + if err := execCommand(exec.Command("go", "mod", "init", "plugin"), pluginDir); err != nil { + return err + } + // download plugin dependency if err := execCommand(exec.Command("go", "get", "github.com/httprunner/hrp/plugin"), pluginDir); err != nil { return err