From 23baeb6f403c34c86eb4d1c1b8278c1cfcec6eff Mon Sep 17 00:00:00 2001 From: k1LoW Date: Mon, 18 Nov 2019 18:55:44 +0900 Subject: [PATCH] bonsai --- cmd/launch.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/launch.go b/cmd/launch.go index 299654d..cdf9ddc 100644 --- a/cmd/launch.go +++ b/cmd/launch.go @@ -49,7 +49,9 @@ var launchCmd = &cobra.Command{ os.Exit(1) } - trackCommand := []string{exe, "track"} + if lang == "" { + lang = os.Getenv("LANG") + } o, err := options.NewOptions( pid, name, @@ -69,6 +71,7 @@ var launchCmd = &cobra.Command{ os.Exit(1) } + trackCommand := []string{exe, "track"} trackCommand = append(trackCommand, o.Get()...) envs := os.Environ() @@ -102,5 +105,5 @@ func init() { launchCmd.Flags().IntVarP(&timeout, "timeout", "", 60*60*24, "Timeout of tracking (seconds)") launchCmd.Flags().StringVarP(&slackChannel, "slack-channel", "", "", "Slack channel to notify") launchCmd.Flags().StringVarP(&slackMention, "slack-mention", "", "", "Slack mention") - launchCmd.Flags().StringVarP(&lang, "lang", "", os.Getenv("LANG"), "Language") + launchCmd.Flags().StringVarP(&lang, "lang", "", "", "Language") }