Merge pull request #7519 from Iceber/fix_flags

This commit is contained in:
Samuel Karp 2022-10-13 11:21:17 -07:00 committed by GitHub
commit 6333c751ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -31,7 +31,7 @@ var startCommand = cli.Command{
Name: "start",
Usage: "start a container that has been created",
ArgsUsage: "CONTAINER",
Flags: []cli.Flag{
Flags: append(platformStartFlags, []cli.Flag{
cli.BoolFlag{
Name: "null-io",
Usage: "send all IO to /dev/null",
@ -52,7 +52,7 @@ var startCommand = cli.Command{
Name: "detach,d",
Usage: "detach from the task after it has started execution",
},
},
}...),
Action: func(context *cli.Context) error {
var (
err error

View File

@ -34,11 +34,11 @@ import (
"golang.org/x/sys/unix"
)
func init() {
startCommand.Flags = append(startCommand.Flags, cli.BoolFlag{
var platformStartFlags = []cli.Flag{
cli.BoolFlag{
Name: "no-pivot",
Usage: "disable use of pivot-root (linux only)",
})
},
}
// HandleConsoleResize resizes the console

View File

@ -29,6 +29,8 @@ import (
"github.com/urfave/cli"
)
var platformStartFlags = []cli.Flag{}
// HandleConsoleResize resizes the console
func HandleConsoleResize(ctx gocontext.Context, task resizer, con console.Console) error {
// do an initial resize of the console