We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 557361a commit 8a30ba1Copy full SHA for 8a30ba1
plugin/plugin.go
@@ -4,6 +4,8 @@ import (
4
"github.com/boson-project/faas/cmd"
5
"knative.dev/client/pkg/kn/plugin"
6
"os"
7
+ "runtime/debug"
8
+ "strings"
9
)
10
11
func init() {
@@ -17,7 +19,13 @@ func (f *faasPlugin) Name() string {
17
19
}
18
20
21
func (f *faasPlugin) Execute(args []string) error {
- rootCmd := cmd.NewRootCmd()
22
+ rootCmd := cmd.NewRootCmd()
23
+ info, _ := debug.ReadBuildInfo()
24
+ for _, dep := range info.Deps {
25
+ if strings.Contains(dep.Path, "boson-project/faas") {
26
+ cmd.SetMeta("", dep.Version, dep.Sum)
27
+ }
28
29
oldArgs := os.Args
30
defer (func() {
31
os.Args = oldArgs
0 commit comments