1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-22 17:01:58 +01:00

fix lack of colors in drone exec output

This commit is contained in:
Brad Rydzewski 2022-11-23 13:33:13 -05:00
parent d32315e667
commit 9de573c558
2 changed files with 7 additions and 4 deletions

@ -70,6 +70,10 @@ var Command = cli.Command{
Name: "trusted",
Usage: "build is trusted",
},
cli.BoolTFlag{
Name: "pretty",
Usage: "enable pretty printing",
},
cli.DurationFlag{
Name: "timeout",
Usage: "build timeout",

@ -47,12 +47,12 @@ type execCommand struct {
PrivateKey string
}
func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
func mapOldToExecCommand(input *cli.Context) *execCommand {
pipelineFile := input.Args().First()
if pipelineFile == "" {
pipelineFile = ".drone.yml"
}
returnVal = &execCommand{
return &execCommand{
Flags: &Flags{
Build: &drone.Build{
Event: input.String("event"),
@ -88,9 +88,8 @@ func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) {
Secrets: readParams(input.String("secrets")),
Config: input.String("registry"),
Privileged: input.StringSlice("privileged"),
Pretty: input.BoolT("pretty"),
}
return returnVal
}
// WithVolumeSlice is a transform function that adds a set of global volumes to the container that are defined in --volume=host:container format.