feat(cli): add --provisioner-log-debug option (#14558)

Allows starting a build in debug mode from the CLI without needing
to have the build fail first by adding `--provisioner-log-debug`.
This commit is contained in:
Cian Johnston
2024-09-04 14:39:35 +01:00
committed by GitHub
parent bd90740166
commit bcf9bc3c90
8 changed files with 77 additions and 24 deletions
+6 -3
View File
@@ -10,8 +10,10 @@ import (
)
func (r *RootCmd) update() *serpent.Command {
var parameterFlags workspaceParameterFlags
var (
parameterFlags workspaceParameterFlags
bflags buildFlags
)
client := new(codersdk.Client)
cmd := &serpent.Command{
Annotations: workspaceCommand,
@@ -32,7 +34,7 @@ func (r *RootCmd) update() *serpent.Command {
return nil
}
build, err := startWorkspace(inv, client, workspace, parameterFlags, WorkspaceUpdate)
build, err := startWorkspace(inv, client, workspace, parameterFlags, bflags, WorkspaceUpdate)
if err != nil {
return xerrors.Errorf("start workspace: %w", err)
}
@@ -54,5 +56,6 @@ func (r *RootCmd) update() *serpent.Command {
}
cmd.Options = append(cmd.Options, parameterFlags.allOptions()...)
cmd.Options = append(cmd.Options, bflags.cliOptions()...)
return cmd
}