From fd5e3b620610f4fe5a000adad337e81a793422a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jevian=20ma=EF=BC=88=E6=B2=83=E8=88=AA=E7=A7=91=E6=8A=80?= =?UTF-8?q?=5F=E9=A9=AC=E4=BD=9C=E4=BC=9F=EF=BC=89?= Date: Mon, 23 May 2022 20:18:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0-p=E5=8F=82=E6=95=B0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=BF=90=E8=A1=8C=E6=97=B6=E7=9A=84=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lalserver/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lalserver/main.go b/app/lalserver/main.go index 468ac30..8281f9b 100644 --- a/app/lalserver/main.go +++ b/app/lalserver/main.go @@ -34,6 +34,7 @@ func main() { func parseFlag() string { binInfoFlag := flag.Bool("v", false, "show bin info") cf := flag.String("c", "", "specify conf file") + p := flag.String("p", "", "specify current work directory") flag.Parse() if *binInfoFlag { @@ -41,6 +42,7 @@ func parseFlag() string { _, _ = fmt.Fprintln(os.Stderr, base.LalFullInfo) os.Exit(0) } + os.Chdir(*p) return *cf }