From 030abc7039dc462b3d45df4a93452e68ca7db74b Mon Sep 17 00:00:00 2001 From: SliverHorn Date: Mon, 16 Nov 2020 00:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=8F=96=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E8=B7=AF=E5=BE=84=E4=BB=A3=E7=A0=81,=E4=BF=AE?= =?UTF-8?q?=E6=94=B9go.mod=E7=9A=84go=E7=89=88=E6=9C=AC=E4=B8=BA1.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/cmd/gva/run.go | 4 +++- server/go.mod | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/cmd/gva/run.go b/server/cmd/gva/run.go index 6eb88339..f5905752 100644 --- a/server/cmd/gva/run.go +++ b/server/cmd/gva/run.go @@ -18,6 +18,7 @@ package gva import ( "gin-vue-admin/utils" "github.com/spf13/cobra" + "os" ) // runCmd represents the run command @@ -31,7 +32,8 @@ var runCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { w := utils.NewWatch() t := utils.NewT() - go w.Watch("./", t) + path, _ := os.Getwd() + go w.Watch(path, t) t.RunTask() }, } diff --git a/server/go.mod b/server/go.mod index 230164e2..358cc460 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,6 +1,6 @@ module gin-vue-admin -go 1.12 +go 1.14 require ( github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect