mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 00:13:52 +01:00
cmd: test: would always run testCmdGlobalInit
This commit is contained in:
parent
9cd83399d3
commit
1a62d635a6
@ -16,8 +16,9 @@ import (
|
||||
)
|
||||
|
||||
var testCmd = &cobra.Command{
|
||||
Use: "test",
|
||||
Short: "test configuration",
|
||||
Use: "test",
|
||||
Short: "test configuration",
|
||||
PersistentPreRun: testCmdGlobalInit,
|
||||
}
|
||||
|
||||
var testCmdGlobal struct {
|
||||
@ -51,7 +52,6 @@ var testPrunePolicyCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
cobra.OnInitialize(testCmdGlobalInit)
|
||||
RootCmd.AddCommand(testCmd)
|
||||
testCmd.AddCommand(testConfigSyntaxCmd)
|
||||
testCmd.AddCommand(testDatasetMapFilter)
|
||||
@ -62,7 +62,7 @@ func init() {
|
||||
testCmd.AddCommand(testPrunePolicyCmd)
|
||||
}
|
||||
|
||||
func testCmdGlobalInit() {
|
||||
func testCmdGlobalInit(cmd *cobra.Command, args []string) {
|
||||
|
||||
testCmdGlobal.log = log.New(os.Stdout, "", 0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user