mirror of https://github.com/knative/func.git
fix: `delete` and `deploy sub-commands respects func.yaml conf
This commit is contained in:
parent
beb838ff43
commit
d5624980d5
|
@ -52,7 +52,12 @@ func runDelete(cmd *cobra.Command, args []string) (err error) {
|
|||
return fmt.Errorf("the given path '%v' does not contain an initialized Function.", config.Path)
|
||||
}
|
||||
|
||||
remover, err := knative.NewRemover(config.Namespace)
|
||||
ns := config.Namespace
|
||||
if ns == "" {
|
||||
ns = function.Namespace
|
||||
}
|
||||
|
||||
remover, err := knative.NewRemover(ns)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -95,7 +95,12 @@ func runDeploy(cmd *cobra.Command, _ []string) (err error) {
|
|||
pusher := docker.NewPusher()
|
||||
pusher.Verbose = config.Verbose
|
||||
|
||||
deployer, err := knative.NewDeployer(config.Namespace)
|
||||
ns := config.Namespace
|
||||
if ns == "" {
|
||||
ns = function.Namespace
|
||||
}
|
||||
|
||||
deployer, err := knative.NewDeployer(ns)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue