From e6f6d3a4765565b09f95a29a2e75be34e1d70359 Mon Sep 17 00:00:00 2001 From: Jesse Date: Mon, 3 May 2021 02:38:16 +0800 Subject: cmd: Add --envfile flag to `start` command (#4141) * add envfile in start cmd * fix commandfuncs * fix commandfuncs * fix cmdStart envfile from bool to string Co-authored-by: Francis Lavoie --- cmd/commandfuncs.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/commandfuncs.go') diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go index d32b9c7..f24a9d0 100644 --- a/cmd/commandfuncs.go +++ b/cmd/commandfuncs.go @@ -45,6 +45,7 @@ func cmdStart(fl Flags) (int, error) { startCmdConfigAdapterFlag := fl.String("adapter") startCmdPidfileFlag := fl.String("pidfile") startCmdWatchFlag := fl.Bool("watch") + startCmdEnvfileFlag := fl.String("envfile") // open a listener to which the child process will connect when // it is ready to confirm that it has successfully started @@ -68,6 +69,9 @@ func cmdStart(fl Flags) (int, error) { if startCmdConfigFlag != "" { cmd.Args = append(cmd.Args, "--config", startCmdConfigFlag) } + if startCmdEnvfileFlag != "" { + cmd.Args = append(cmd.Args, "--envfile", startCmdEnvfileFlag) + } if startCmdConfigAdapterFlag != "" { cmd.Args = append(cmd.Args, "--adapter", startCmdConfigAdapterFlag) } -- cgit v1.2.3