Skip to content

Commit

Permalink
fix: delete and `deploy sub-commands respects func.yaml conf
Browse files Browse the repository at this point in the history
  • Loading branch information
matejvasek committed Nov 6, 2020
1 parent beb838f commit d562498
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion cmd/delete.go
Expand Up @@ -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
}
Expand Down
7 changes: 6 additions & 1 deletion cmd/deploy.go
Expand Up @@ -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
}
Expand Down

0 comments on commit d562498

Please sign in to comment.