mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 12:59:39 +08:00
feat: add --output command in hrp build
This commit is contained in:
@@ -12,15 +12,19 @@ var buildCmd = &cobra.Command{
|
||||
Long: `build python/go plugin for testing`,
|
||||
Example: ` $ hrp build plugin/debugtalk.go
|
||||
$ hrp build plugin/debugtalk.py`,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Args: cobra.ExactArgs(1),
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
setLogLevel(logLevel)
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return build.Run(args)
|
||||
return build.Run(args[0], output)
|
||||
},
|
||||
}
|
||||
|
||||
var output string
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(buildCmd)
|
||||
|
||||
buildCmd.Flags().StringVarP(&output, "output", "o", "", "funplugin product output path, default: cwd")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user