summaryrefslogtreecommitdiff
path: root/cmd/commandfuncs.go
diff options
context:
space:
mode:
authorJesse <szx961102@gmail.com>2021-05-03 02:38:16 +0800
committerGitHub <noreply@github.com>2021-05-02 12:38:16 -0600
commite6f6d3a4765565b09f95a29a2e75be34e1d70359 (patch)
tree4c262608e8f626abda574db9b59e9fefc6c56c05 /cmd/commandfuncs.go
parentef7f15f3a42474319e2db0dff6720d91c153f0bf (diff)
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 <lavofr@gmail.com>
Diffstat (limited to 'cmd/commandfuncs.go')
-rw-r--r--cmd/commandfuncs.go4
1 files changed, 4 insertions, 0 deletions
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)
}