create temporary dir for overlayfs not in __child

This commit is contained in:
Christian Goll
2023-01-27 16:19:30 +01:00
parent 6d560ac02a
commit 71a3867bbe
4 changed files with 39 additions and 31 deletions

View File

@@ -5,17 +5,19 @@ import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "__child",
Hidden: true,
RunE: CobraRunE,
Args: cobra.MinimumNArgs(1),
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
Use: "__child",
Hidden: true,
RunE: CobraRunE,
Args: cobra.MinimumNArgs(1),
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
}
binds []string
binds []string
tempDir string
)
func init() {
baseCmd.PersistentFlags().StringArrayVarP(&binds, "bind", "b", []string{}, "bind points")
baseCmd.Flags().StringArrayVarP(&binds, "bind", "b", []string{}, "bind points")
baseCmd.Flags().StringVar(&tempDir, "tempdir", "", "tempdir")
}
// GetRootCommand returns the root cobra.Command for the application.