-
Notifications
You must be signed in to change notification settings - Fork 129
/
overlay.go
39 lines (32 loc) · 1.18 KB
/
overlay.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) Contributors to the Apptainer project, established as
// Apptainer a Series of LF Projects LLC.
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
package cli
import (
"errors"
"github.com/apptainer/apptainer/docs"
"github.com/apptainer/apptainer/pkg/cmdline"
"github.com/spf13/cobra"
)
func init() {
addCmdInit(func(cmdManager *cmdline.CommandManager) {
cmdManager.RegisterCmd(OverlayCmd)
cmdManager.RegisterSubCmd(OverlayCmd, OverlayCreateCmd)
cmdManager.RegisterFlagForCmd(&overlaySizeFlag, OverlayCreateCmd)
cmdManager.RegisterFlagForCmd(&overlayCreateDirFlag, OverlayCreateCmd)
cmdManager.RegisterFlagForCmd(&overlayFakerootFlag, OverlayCreateCmd)
cmdManager.RegisterFlagForCmd(&overlaySparseFlag, OverlayCreateCmd)
})
}
// OverlayCmd is the 'overlay' command that allows to manage writable overlay.
var OverlayCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
return errors.New("invalid command")
},
DisableFlagsInUseLine: true,
Use: docs.OverlayUse,
Short: docs.OverlayShort,
Long: docs.OverlayLong,
Example: docs.OverlayExample,
}