Skip to content

Commit

Permalink
Simplifying the end of build message.
Browse files Browse the repository at this point in the history
Turns out the summary is a slippery slope!
  • Loading branch information
javaducky committed Mar 18, 2022
1 parent dbf0962 commit b18f9ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/xk6/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func main() {
func runBuild(ctx context.Context, args []string) error {
// parse the command line args... rather primitively
var argK6Version, output string
var outputOverride bool
var extensions []xk6.Dependency
var replacements []xk6.Replace
for i := 0; i < len(args); i++ {
Expand Down Expand Up @@ -108,6 +109,7 @@ func runBuild(ctx context.Context, args []string) error {
}
i++
output = args[i]
outputOverride = true

default:
if argK6Version != "" {
Expand Down Expand Up @@ -160,14 +162,12 @@ func runBuild(ctx context.Context, args []string) error {
}
}

fmt.Println("***************************************************")
fmt.Println("* BUILD COMPLETE - FOLLOW THESE STEPS TO CONTINUE *")
fmt.Println("***************************************************")
fmt.Println("xk6 has now produced a new k6 binary with the following:")
for _, extension := range extensions {
fmt.Println(" -", extension.PackagePath)
if !outputOverride {
path, _ := os.Getwd()
fmt.Println()
fmt.Println("xk6 has now produced a new k6 binary which may be different than the command on your system path!")
fmt.Printf("Be sure to run '%v run <SCRIPT_NAME>' from the '%v' directory.\n", output, path)
}
fmt.Printf("To use it, call it directly as `%v run <SCRIPT_NAME>`.\n", output)

return nil
}
Expand Down

0 comments on commit b18f9ed

Please sign in to comment.