Skip to content

Commit

Permalink
Merge pull request grafana#42 from grafana/paul/post-build-message
Browse files Browse the repository at this point in the history
Provide an end-of-build message
  • Loading branch information
javaducky committed Mar 18, 2022
2 parents 25958d3 + b18f9ed commit 9001905
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 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,6 +162,13 @@ func runBuild(ctx context.Context, args []string) error {
}
}

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)
}

return nil
}

Expand Down

0 comments on commit 9001905

Please sign in to comment.