feat #1342: support specify custom python3 venv

This commit is contained in:
debugtalk
2022-06-13 21:31:05 +08:00
parent abd31a8d88
commit fac6dc4955
35 changed files with 381 additions and 123 deletions
+7
View File
@@ -1,9 +1,11 @@
package cmd
import (
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/httprunner/httprunner/v4/hrp"
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
)
var buildCmd = &cobra.Command{
@@ -17,6 +19,11 @@ var buildCmd = &cobra.Command{
setLogLevel(logLevel)
},
RunE: func(cmd *cobra.Command, args []string) error {
err := builtin.PrepareVenv(venv)
if err != nil {
log.Error().Err(err).Msg("prepare python3 venv failed")
return err
}
return hrp.BuildPlugin(args[0], output)
},
}