Skip to content

Commit

Permalink
Highlight the path to the script created with k6 init
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewslotin committed Oct 16, 2023
1 parent d2b8200 commit 48274dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"path"
"text/template"

"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"go.k6.io/k6/cmd/state"
Expand Down Expand Up @@ -122,7 +123,8 @@ func (c *initCmd) run(cmd *cobra.Command, args []string) error { //nolint:revive
return err
}

printToStdout(c.gs, fmt.Sprintf("Initialized a new k6 test script in %s. You can now execute it by running `%s run %s`.\n", target, c.gs.BinaryName, target))
valueColor := getColor(c.gs.Flags.NoColor || !c.gs.Stdout.IsTTY, color.Bold)
printToStdout(c.gs, fmt.Sprintf("Initialized a new k6 test script in %s. You can now execute it by running `%s run %s`.\n", valueColor.Sprint(target), c.gs.BinaryName, target))

Check failure on line 127 in cmd/init.go

View workflow job for this annotation

GitHub Actions / lint

line is 177 characters (lll)

return nil
}
Expand Down

0 comments on commit 48274dd

Please sign in to comment.