mirror of https://github.com/knative/func.git
fix: root cmd init
This commit is contained in:
parent
85a5f475eb
commit
ec5327d520
|
|
@ -34,7 +34,7 @@ func NewRootCmd() *cobra.Command {
|
|||
// When the code is loaded into memory upon invocation, the cobra/viper packages
|
||||
// are invoked to gather system context. This includes reading the configuration
|
||||
// file, environment variables, and parsing the command flags.
|
||||
func Init() {
|
||||
func init() {
|
||||
// read in environment variables that match
|
||||
viper.AutomaticEnv()
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ func (f *faasPlugin) Name() string {
|
|||
|
||||
func (f *faasPlugin) Execute(args []string) error {
|
||||
rootCmd := cmd.NewRootCmd()
|
||||
cmd.Init()
|
||||
oldArgs := os.Args
|
||||
defer (func() {
|
||||
os.Args = oldArgs
|
||||
|
|
|
|||
Loading…
Reference in New Issue