|
@ -25,6 +25,11 @@ const ( |
|
|
// isolate provides a clean setup and returns a copy of RootCmd you can
|
|
|
// isolate provides a clean setup and returns a copy of RootCmd you can
|
|
|
// modify in the test cases
|
|
|
// modify in the test cases
|
|
|
func isolate(cmds ...*cobra.Command) cli.Executable { |
|
|
func isolate(cmds ...*cobra.Command) cli.Executable { |
|
|
|
|
|
os.Unsetenv("TMHOME") |
|
|
|
|
|
os.Unsetenv("TM_HOME") |
|
|
|
|
|
os.Unsetenv("TMROOT") |
|
|
|
|
|
os.Unsetenv("TM_ROOT") |
|
|
|
|
|
|
|
|
viper.Reset() |
|
|
viper.Reset() |
|
|
config = cfg.DefaultConfig() |
|
|
config = cfg.DefaultConfig() |
|
|
r := &cobra.Command{ |
|
|
r := &cobra.Command{ |
|
|