Add a new flag to images pull for printing out the pulled image's chainID
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
This commit is contained in:
@@ -280,6 +280,10 @@ var prepareCommand = cli.Command{
|
||||
Name: "target, t",
|
||||
Usage: "mount target path, will print mount, if provided",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "mounts",
|
||||
Usage: "Print out snapshot mounts as JSON",
|
||||
},
|
||||
},
|
||||
Action: func(context *cli.Context) error {
|
||||
if narg := context.NArg(); narg < 1 || narg > 2 {
|
||||
@@ -310,6 +314,10 @@ var prepareCommand = cli.Command{
|
||||
printMounts(target, mounts)
|
||||
}
|
||||
|
||||
if context.Bool("mounts") {
|
||||
commands.PrintAsJSON(mounts)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
@@ -323,6 +331,10 @@ var viewCommand = cli.Command{
|
||||
Name: "target, t",
|
||||
Usage: "mount target path, will print mount, if provided",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "mounts",
|
||||
Usage: "Print out snapshot mounts as JSON",
|
||||
},
|
||||
},
|
||||
Action: func(context *cli.Context) error {
|
||||
if narg := context.NArg(); narg < 1 || narg > 2 {
|
||||
@@ -349,6 +361,10 @@ var viewCommand = cli.Command{
|
||||
printMounts(target, mounts)
|
||||
}
|
||||
|
||||
if context.Bool("mounts") {
|
||||
commands.PrintAsJSON(mounts)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user