mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
[no-relnote] Minor cleanup in create-symlinks
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
dc0e191093
commit
5e3e91a010
@ -46,11 +46,10 @@ func NewCommand(logger logger.Interface) *cli.Command {
|
|||||||
return c.build()
|
return c.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
// build
|
// build creates the create-symlink command.
|
||||||
func (m command) build() *cli.Command {
|
func (m command) build() *cli.Command {
|
||||||
cfg := config{}
|
cfg := config{}
|
||||||
|
|
||||||
// Create the '' command
|
|
||||||
c := cli.Command{
|
c := cli.Command{
|
||||||
Name: "create-symlinks",
|
Name: "create-symlinks",
|
||||||
Usage: "A hook to create symlinks in the container.",
|
Usage: "A hook to create symlinks in the container.",
|
||||||
@ -60,20 +59,23 @@ func (m command) build() *cli.Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.Flags = []cli.Flag{
|
c.Flags = []cli.Flag{
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "host-root",
|
|
||||||
Usage: "The root on the host filesystem to use to resolve symlinks",
|
|
||||||
Destination: &cfg.hostRoot,
|
|
||||||
},
|
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "link",
|
Name: "link",
|
||||||
Usage: "Specify a specific link to create. The link is specified as target::link",
|
Usage: "Specify a specific link to create. The link is specified as target::link",
|
||||||
Destination: &cfg.links,
|
Destination: &cfg.links,
|
||||||
},
|
},
|
||||||
|
// The following flags are testing-only flags.
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "host-root",
|
||||||
|
Usage: "The root on the host filesystem to use to resolve symlinks. This is only intended for testing.",
|
||||||
|
Destination: &cfg.hostRoot,
|
||||||
|
Hidden: true,
|
||||||
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "container-spec",
|
Name: "container-spec",
|
||||||
Usage: "Specify the path to the OCI container spec. If empty or '-' the spec will be read from STDIN",
|
Usage: "Specify the path to the OCI container spec. If empty or '-' the spec will be read from STDIN. This is only intended for testing.",
|
||||||
Destination: &cfg.containerSpec,
|
Destination: &cfg.containerSpec,
|
||||||
|
Hidden: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user