添加-p参数设置运行时的路径

pull/180/head
jevian ma(沃航科技_马作伟) 3 years ago
parent 5ef6241749
commit fd5e3b6206

@ -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
}

Loading…
Cancel
Save